class MfaSessionManager (View source)

MfaSessionManager

Centralizes all MFA-related session operations to provide consistency across different parts of the application.

Methods

static void
setLogger(LoggerInterface $logger)

No description

static void
setMfaRequired(int $userId)

Flags a user as requiring MFA verification

static void
setMfaVerified()

Marks MFA as completed and sets the user as fully authenticated

static bool
isMfaRequired()

Check if MFA is required for the current user

static MfaSessionState
currentState()

The session's verification state.

static void
setMfaNotRequired()

Record that no second factor applies, so the four slots cannot disagree.

static void
reset()

Reset all MFA-related session variables

Details

static void setLogger(LoggerInterface $logger)

No description

Parameters

LoggerInterface $logger

Return Value

void

static void setMfaRequired(int $userId)

Flags a user as requiring MFA verification

Parameters

int $userId

The user ID

Return Value

void

static void setMfaVerified()

Marks MFA as completed and sets the user as fully authenticated

Return Value

void

static bool isMfaRequired()

Check if MFA is required for the current user

Return Value

bool

static MfaSessionState currentState()

The session's verification state.

Sessions established before MFA_STATE existed are classified from the legacy slots, which is why that reconciliation is still here. Its "absent means not required" default is load-bearing: users who have no second factor never get any of these keys set.

Return Value

MfaSessionState

static void setMfaNotRequired()

Record that no second factor applies, so the four slots cannot disagree.

Return Value

void

static void reset()

Reset all MFA-related session variables

Return Value

void