class RequirePassword

Methods

__construct(ResponseFactory $responseFactory, UrlGenerator $urlGenerator, Factory $auth, Repository $config)

Create a new middleware instance.

static string
using(string|null $redirectToRoute = null, string|int|null $passwordTimeoutSeconds = null)

Specify the redirect route and timeout for the middleware.

Response
handle(Request $request, Closure $next, string|null $redirectToRoute = null, string|int|null $passwordTimeoutSeconds = null)

Handle an incoming request.

bool
shouldConfirmPassword(Request $request, string|int|null $passwordTimeoutSeconds = null)

Determine if the confirmation timeout has expired.

Details

at line 22
__construct(ResponseFactory $responseFactory, UrlGenerator $urlGenerator, Factory $auth, Repository $config)

Create a new middleware instance.

Parameters

ResponseFactory $responseFactory
UrlGenerator $urlGenerator
Factory $auth
Repository $config

at line 33
static string using(string|null $redirectToRoute = null, string|int|null $passwordTimeoutSeconds = null)

Specify the redirect route and timeout for the middleware.

Parameters

string|null $redirectToRoute
string|int|null $passwordTimeoutSeconds

Return Value

string

at line 41
Response handle(Request $request, Closure $next, string|null $redirectToRoute = null, string|int|null $passwordTimeoutSeconds = null)

Handle an incoming request.

Parameters

Request $request
Closure $next
string|null $redirectToRoute
string|int|null $passwordTimeoutSeconds

Return Value

Response

at line 65
protected bool shouldConfirmPassword(Request $request, string|int|null $passwordTimeoutSeconds = null)

Determine if the confirmation timeout has expired.

The confirmation timestamp and timeout are scoped to the current guard, so confirming a password under one guard never satisfies password confirmation under another.

Parameters

Request $request
string|int|null $passwordTimeoutSeconds

Return Value

bool