final class AuthOutcome (View source)

Result of an authenticator run: the decision, the login message on failure, and the application path the caller should redirect to when the request was a login post.

Methods

static AuthOutcome
success(string|null $redirectPath = null)

The session is authenticated. $redirectPath is set when a login just completed.

static AuthOutcome
mfaRequired(string|null $redirectPath = null)

The first factor was accepted and the second is still owed. $redirectPath is set when the credentials were just posted.

static AuthOutcome
failure(string $message, bool $endSession = false)

The request is not authenticated; $message goes to the login page. $endSession asks the caller to clear the session as well, not only to flash the message.

bool
isFailure()

No description

Details

static AuthOutcome success(string|null $redirectPath = null)

The session is authenticated. $redirectPath is set when a login just completed.

Parameters

string|null $redirectPath

Return Value

AuthOutcome

static AuthOutcome mfaRequired(string|null $redirectPath = null)

The first factor was accepted and the second is still owed. $redirectPath is set when the credentials were just posted.

Parameters

string|null $redirectPath

Return Value

AuthOutcome

static AuthOutcome failure(string $message, bool $endSession = false)

The request is not authenticated; $message goes to the login page. $endSession asks the caller to clear the session as well, not only to flash the message.

Parameters

string $message
bool $endSession

Return Value

AuthOutcome

bool isFailure()

No description

Return Value

bool