class Fortify

Constants

PASSWORD_UPDATED

PROFILE_INFORMATION_UPDATED

RECOVERY_CODES_GENERATED

TWO_FACTOR_AUTHENTICATION_CONFIRMED

TWO_FACTOR_AUTHENTICATION_DISABLED

TWO_FACTOR_AUTHENTICATION_ENABLED

VERIFICATION_LINK_SENT

private DEFAULT_REGISTERS_ROUTES

Methods

static string
username()

Get the username used for authentication.

static string
email()

Get the name of the email address request variable / field.

static string
redirects(string $redirect, mixed $default = null, Request|null $request = null)

Get a completion redirect path for a specific feature.

static void
redirectUsing(string $redirect, callable|null $callback)

Register a request-aware redirect resolver.

static void
viewNamespace(string $namespace)

Register the views for Fortify using conventional names under the given namespace.

static void
viewPrefix(string $prefix)

Register the views for Fortify using conventional names under the given prefix.

static void
loginView(callable|string $view)

Specify which view should be used as the login view.

static void
twoFactorChallengeView(callable|string $view)

Specify which view should be used as the two factor authentication challenge view.

static void
resetPasswordView(callable|string $view)

Specify which view should be used as the new password view.

static void
registerView(callable|string $view)

Specify which view should be used as the registration view.

static void
verifyEmailView(callable|string $view)

Specify which view should be used as the email verification prompt.

static void
confirmPasswordView(callable|string $view)

Specify which view should be used as the password confirmation prompt.

static void
requestPasswordResetLinkView(callable|string $view)

Specify which view should be used as the request password reset link view.

static void
loginThrough(callable $callback)

Register a callback that is responsible for building the authentication pipeline array.

static void
authenticateThrough(callable $callback)

Register a callback that is responsible for building the authentication pipeline array.

static Closure|null
authenticateThroughCallback()

Get the configured authentication pipeline callback.

static void
authenticateUsing(callable $callback)

Register a callback that is responsible for validating incoming authentication credentials.

static Closure|null
authenticateUsingCallback()

Get the configured credential authentication callback.

static void
redirectUserForTwoFactorAuthenticationUsing(callable|string $callback)

Register a class / callback that should be used to redirect users for two factor authentication.

static void
confirmPasswordsUsing(callable $callback)

Register a callback that is responsible for confirming existing user passwords as valid.

static Closure|null
confirmPasswordsUsingCallback()

Get the configured password confirmation callback.

static void
createUsersUsing(callable|string $callback)

Register a class / callback that should be used to create new users.

static void
updateUserProfileInformationUsing(callable|string $callback)

Register a class / callback that should be used to update user profile information.

static void
updateUserPasswordsUsing(callable|string $callback)

Register a class / callback that should be used to update user passwords.

static void
resetUserPasswordsUsing(callable|string $callback)

Register a class / callback that should be used to reset user passwords.

static bool
confirmsTwoFactorAuthentication()

Determine if Fortify is confirming two factor authentication configurations.

static Fortify
encryptUsing(Encrypter|null $encrypter)

Set the encrypter instance that will be used to encrypt attributes.

static Encrypter
currentEncrypter()

Get the current encrypter being used by Fortify models.

static string
guardName()

Get the current authentication guard name.

static StatefulGuard
guard()

Get the current stateful authentication guard.

static bool
shouldRegisterRoutes()

Determine if Fortify routes should be registered.

static Fortify
ignoreRoutes()

Configure Fortify to not register its routes.

static void
flushState()

Flush all static state.

Details

at line 64
static string username()

Get the username used for authentication.

Return Value

string

at line 72
static string email()

Get the name of the email address request variable / field.

Return Value

string

at line 80
static string redirects(string $redirect, mixed $default = null, Request|null $request = null)

Get a completion redirect path for a specific feature.

Parameters

string $redirect
mixed $default
Request|null $request

Return Value

string

at line 102
static void redirectUsing(string $redirect, callable|null $callback)

Register a request-aware redirect resolver.

Boot-only. The callback persists in static state for the worker lifetime and affects every subsequent response for the named Fortify redirect.

Parameters

string $redirect
callable|null $callback

Return Value

void

at line 118
static void viewNamespace(string $namespace)

Register the views for Fortify using conventional names under the given namespace.

Boot-only. The response bindings persist in the container for the worker lifetime and affect every subsequent request.

Parameters

string $namespace

Return Value

void

at line 128
static void viewPrefix(string $prefix)

Register the views for Fortify using conventional names under the given prefix.

Boot-only. The response bindings persist in the container for the worker lifetime and affect every subsequent request.

Parameters

string $prefix

Return Value

void

at line 144
static void loginView(callable|string $view)

Specify which view should be used as the login view.

Boot-only. The response binding persists in the container for the worker lifetime and affects every subsequent request.

Parameters

callable|string $view

Return Value

void

at line 154
static void twoFactorChallengeView(callable|string $view)

Specify which view should be used as the two factor authentication challenge view.

Boot-only. The response binding persists in the container for the worker lifetime and affects every subsequent request.

Parameters

callable|string $view

Return Value

void

at line 164
static void resetPasswordView(callable|string $view)

Specify which view should be used as the new password view.

Boot-only. The response binding persists in the container for the worker lifetime and affects every subsequent request.

Parameters

callable|string $view

Return Value

void

at line 174
static void registerView(callable|string $view)

Specify which view should be used as the registration view.

Boot-only. The response binding persists in the container for the worker lifetime and affects every subsequent request.

Parameters

callable|string $view

Return Value

void

at line 184
static void verifyEmailView(callable|string $view)

Specify which view should be used as the email verification prompt.

Boot-only. The response binding persists in the container for the worker lifetime and affects every subsequent request.

Parameters

callable|string $view

Return Value

void

at line 194
static void confirmPasswordView(callable|string $view)

Specify which view should be used as the password confirmation prompt.

Boot-only. The response binding persists in the container for the worker lifetime and affects every subsequent request.

Parameters

callable|string $view

Return Value

void

at line 204
static void requestPasswordResetLinkView(callable|string $view)

Specify which view should be used as the request password reset link view.

Boot-only. The response binding persists in the container for the worker lifetime and affects every subsequent request.

Parameters

callable|string $view

Return Value

void

at line 214
static void loginThrough(callable $callback)

Register a callback that is responsible for building the authentication pipeline array.

Boot-only. The callback persists in static state for the worker lifetime and affects every subsequent login request.

Parameters

callable $callback

Return Value

void

at line 224
static void authenticateThrough(callable $callback)

Register a callback that is responsible for building the authentication pipeline array.

Boot-only. The callback persists in static state for the worker lifetime and affects every subsequent login request.

Parameters

callable $callback

Return Value

void

at line 232
static Closure|null authenticateThroughCallback()

Get the configured authentication pipeline callback.

Return Value

Closure|null

at line 242
static void authenticateUsing(callable $callback)

Register a callback that is responsible for validating incoming authentication credentials.

Boot-only. The callback persists in static state for the worker lifetime and affects every subsequent login request.

Parameters

callable $callback

Return Value

void

at line 250
static Closure|null authenticateUsingCallback()

Get the configured credential authentication callback.

Return Value

Closure|null

at line 260
static void redirectUserForTwoFactorAuthenticationUsing(callable|string $callback)

Register a class / callback that should be used to redirect users for two factor authentication.

Boot-only. The scoped binding configuration persists for the worker lifetime and affects future requests.

Parameters

callable|string $callback

Return Value

void

at line 270
static void confirmPasswordsUsing(callable $callback)

Register a callback that is responsible for confirming existing user passwords as valid.

Boot-only. The callback persists in static state for the worker lifetime and affects every subsequent password confirmation request.

Parameters

callable $callback

Return Value

void

at line 278
static Closure|null confirmPasswordsUsingCallback()

Get the configured password confirmation callback.

Return Value

Closure|null

at line 288
static void createUsersUsing(callable|string $callback)

Register a class / callback that should be used to create new users.

Boot-only. The binding persists in the container for the worker lifetime and affects every subsequent registration request.

Parameters

callable|string $callback

Return Value

void

at line 298
static void updateUserProfileInformationUsing(callable|string $callback)

Register a class / callback that should be used to update user profile information.

Boot-only. The binding persists in the container for the worker lifetime and affects every subsequent profile update request.

Parameters

callable|string $callback

Return Value

void

at line 308
static void updateUserPasswordsUsing(callable|string $callback)

Register a class / callback that should be used to update user passwords.

Boot-only. The binding persists in the container for the worker lifetime and affects every subsequent password update request.

Parameters

callable|string $callback

Return Value

void

at line 318
static void resetUserPasswordsUsing(callable|string $callback)

Register a class / callback that should be used to reset user passwords.

Boot-only. The binding persists in the container for the worker lifetime and affects every subsequent password reset request.

Parameters

callable|string $callback

Return Value

void

at line 326
static bool confirmsTwoFactorAuthentication()

Determine if Fortify is confirming two factor authentication configurations.

Return Value

bool

at line 336
static Fortify encryptUsing(Encrypter|null $encrypter)

Set the encrypter instance that will be used to encrypt attributes.

Boot-only. The encrypter persists in static state for the worker lifetime and affects every subsequent encrypted Fortify attribute.

Parameters

Encrypter|null $encrypter

Return Value

Fortify

at line 346
static Encrypter currentEncrypter()

Get the current encrypter being used by Fortify models.

Return Value

Encrypter

at line 354
static string guardName()

Get the current authentication guard name.

Return Value

string

at line 364
static StatefulGuard guard()

Get the current stateful authentication guard.

Return Value

StatefulGuard

at line 380
static bool shouldRegisterRoutes()

Determine if Fortify routes should be registered.

Return Value

bool

at line 390
static Fortify ignoreRoutes()

Configure Fortify to not register its routes.

Boot-only. The route registration flag persists in static state for the worker lifetime and affects route bootstrapping.

Return Value

Fortify

at line 424
static void flushState()

Flush all static state.

Return Value

void