interface IdentityHandler

Serializes and restores identity to/from persistent storage.

Methods

sleepIdentity(IIdentity $identity)

Called before identity is written to storage. Typically replaces the full identity with a lightweight token.

IIdentity|null
wakeupIdentity(IIdentity $identity)

Called after identity is read from storage. Typically refreshes roles or validates the token. Returns null to force logout.

IIdentity|null
getGuestIdentity()

Returns the identity for an anonymous (not logged-in) user, or null if none.

Details

at line 19
IIdentity sleepIdentity(IIdentity $identity)

Called before identity is written to storage. Typically replaces the full identity with a lightweight token.

Parameters

IIdentity $identity

Return Value

IIdentity

at line 24
IIdentity|null wakeupIdentity(IIdentity $identity)

Called after identity is read from storage. Typically refreshes roles or validates the token. Returns null to force logout.

Parameters

IIdentity $identity

Return Value

IIdentity|null

at line 29
IIdentity|null getGuestIdentity()

Returns the identity for an anonymous (not logged-in) user, or null if none.

Return Value

IIdentity|null