芝麻web文件管理V1.00
编辑当前文件:/home/digitalh/public_html/vendor/laravel/fortify/src/TwoFactorAuthenticatable.php
two_factor_secret) && ! is_null($this->two_factor_confirmed_at); } return ! is_null($this->two_factor_secret); } /** * Get the user's two factor authentication recovery codes. * * @return array */ public function recoveryCodes() { return json_decode(decrypt($this->two_factor_recovery_codes), true); } /** * Replace the given recovery code with a new one in the user's stored codes. * * @param string $code * @return void */ public function replaceRecoveryCode($code) { $this->forceFill([ 'two_factor_recovery_codes' => encrypt(str_replace( $code, RecoveryCode::generate(), decrypt($this->two_factor_recovery_codes) )), ])->save(); } /** * Get the QR code SVG of the user's two factor authentication QR code URL. * * @return string */ public function twoFactorQrCodeSvg() { $svg = (new Writer( new ImageRenderer( new RendererStyle(192, 0, null, null, Fill::uniformColor(new Rgb(255, 255, 255), new Rgb(45, 55, 72))), new SvgImageBackEnd ) ))->writeString($this->twoFactorQrCodeUrl()); return trim(substr($svg, strpos($svg, "\n") + 1)); } /** * Get the two factor authentication QR code URL. * * @return string */ public function twoFactorQrCodeUrl() { return app(TwoFactorAuthenticationProvider::class)->qrCodeUrl( config('app.name'), $this->{Fortify::username()}, decrypt($this->two_factor_secret) ); } }