|
4 | 4 |
|
5 | 5 | use Illuminate\Support\Facades\Facade; |
6 | 6 |
|
| 7 | +/** |
| 8 | + * Laravel Facade for the MFA service. |
| 9 | + * |
| 10 | + * Adding explicit method annotations here allows IDEs (PHPStorm, Intelephense) |
| 11 | + * to provide static autocompletion when calling methods like MFA::setupTotp(). |
| 12 | + * |
| 13 | + * @method static array setupTotp(\Illuminate\Contracts\Auth\Authenticatable $user, ?string $issuer = null, ?string $label = null) |
| 14 | + * @method static bool verifyTotp(\Illuminate\Contracts\Auth\Authenticatable $user, string $code) |
| 15 | + * @method static ?\CodingLibs\MFA\Models\MfaChallenge issueChallenge(\Illuminate\Contracts\Auth\Authenticatable $user, string $method) |
| 16 | + * @method static void registerChannel(\CodingLibs\MFA\Contracts\MfaChannel $channel) |
| 17 | + * @method static ?string generateTotpQrCodeBase64(\Illuminate\Contracts\Auth\Authenticatable $user, ?string $issuer = null, ?string $label = null, int $size = 200) |
| 18 | + * @method static bool verifyChallenge(\Illuminate\Contracts\Auth\Authenticatable $user, string $method, string $code) |
| 19 | + * @method static bool isRememberEnabled() |
| 20 | + * @method static string getRememberCookieName() |
| 21 | + * @method static ?string getRememberTokenFromRequest(\Illuminate\Http\Request $request) |
| 22 | + * @method static bool shouldSkipVerification(\Illuminate\Contracts\Auth\Authenticatable $user, ?string $token) |
| 23 | + * @method static array rememberDevice(\Illuminate\Contracts\Auth\Authenticatable $user, ?int $lifetimeDays = null, ?string $deviceName = null) |
| 24 | + * @method static \Symfony\Component\HttpFoundation\Cookie makeRememberCookie(string $token, ?int $lifetimeDays = null) |
| 25 | + * @method static int forgetRememberedDevice(\Illuminate\Contracts\Auth\Authenticatable $user, string $token) |
| 26 | + * @method static \CodingLibs\MFA\Models\MfaMethod enableMethod(\Illuminate\Contracts\Auth\Authenticatable $user, string $method, array $attributes = []) |
| 27 | + * @method static bool disableMethod(\Illuminate\Contracts\Auth\Authenticatable $user, string $method) |
| 28 | + * @method static bool isEnabled(\Illuminate\Contracts\Auth\Authenticatable $user, string $method) |
| 29 | + * @method static ?\CodingLibs\MFA\Models\MfaMethod getMethod(\Illuminate\Contracts\Auth\Authenticatable $user, string $method) |
| 30 | + * |
| 31 | + * @mixin \CodingLibs\MFA\MFA |
| 32 | + * @see \CodingLibs\MFA\MFA |
| 33 | + */ |
7 | 34 | class MFA extends Facade |
8 | 35 | { |
9 | 36 | protected static function getFacadeAccessor(): string |
|
0 commit comments