class AuthenticateSession implements AuthenticatesSessions

Properties

static protected null|callable $redirectToCallback

The callback that should be used to generate the authentication redirect path.

Methods

__construct(Factory $auth)

Create a new middleware instance.

mixed
handle(Request $request, Closure $next)

Handle an incoming request.

void
storePasswordHashInSession(Request $request)

Store the user's current password hash in the session.

bool
validatePasswordHash(string $passwordHash, mixed $storedValue)

Validate the password hash against the stored value.

void
logout(Request $request)

Log the user out of the application.

guard()

Get the guard instance that should be used by the middleware.

string|null
redirectTo(Request $request)

Get the path the user should be redirected to when their session is not authenticated.

static void
redirectUsing(callable $redirectToCallback)

Specify the callback that should be used to generate the redirect path.

static void
flushState()

Flush all static state.

Details

at line 25
__construct(Factory $auth)

Create a new middleware instance.

Parameters

Factory $auth

at line 33
mixed handle(Request $request, Closure $next)

Handle an incoming request.

Parameters

Request $request
Closure $next

Return Value

mixed

at line 68
protected void storePasswordHashInSession(Request $request)

Store the user's current password hash in the session.

Parameters

Request $request

Return Value

void

at line 89
protected bool validatePasswordHash(string $passwordHash, mixed $storedValue)

Validate the password hash against the stored value.

Only HMAC artifacts are valid; Hypervel has no released raw-hash session artifacts to accept.

Parameters

string $passwordHash
mixed $storedValue

Return Value

bool

at line 100
protected void logout(Request $request)

Log the user out of the application.

Parameters

Request $request

Return Value

void

Exceptions

AuthenticationException

at line 116
protected Factory guard()

Get the guard instance that should be used by the middleware.

Return Value

Factory

at line 124
protected string|null redirectTo(Request $request)

Get the path the user should be redirected to when their session is not authenticated.

Parameters

Request $request

Return Value

string|null

at line 139
static void redirectUsing(callable $redirectToCallback)

Specify the callback that should be used to generate the redirect path.

Boot-only. The callback persists in a static property for the worker lifetime and runs on every subsequent session-mismatch.

Parameters

callable $redirectToCallback

Return Value

void

at line 147
static void flushState()

Flush all static state.

Return Value

void