CookieAuthenticationHandler
class CookieAuthenticationHandler implements AuthenticationHandler (View source)
Authenticate a member passed on a session cookie
Methods
Set the name of the cookie used to track this device
Set the name of the cookie used to store an login token
Get whether the cookie used to store an login token is "secure" or not
Set whether the cookie used to store an login token is "secure" or not
Get the "SameSite" attribute of authentication token cookies.
Set the "SameSite" attribute of authentication token cookies.
Once a member is found by authenticateRequest() pass it to this identity store
Details
string
getDeviceCookieName()
Get the name of the cookie used to track this device
CookieAuthenticationHandler
setDeviceCookieName(string $deviceCookieName)
Set the name of the cookie used to track this device
string
getTokenCookieName()
Get the name of the cookie used to store an login token
CookieAuthenticationHandler
setTokenCookieName(string $tokenCookieName)
Set the name of the cookie used to store an login token
bool
getTokenCookieSecure()
Get whether the cookie used to store an login token is "secure" or not
CookieAuthenticationHandler
setTokenCookieSecure(bool $tokenCookieSecure)
Set whether the cookie used to store an login token is "secure" or not
string
getTokenCookieSameSite()
Get the "SameSite" attribute of authentication token cookies.
Empty string means the value from Cookie.default_samesite will be used.
CookieAuthenticationHandler
setTokenCookieSameSite(string $tokenCookieSameSite)
Set the "SameSite" attribute of authentication token cookies.
Setting to an empty string means the value from Cookie.default_samesite will be used.
IdentityStore
getCascadeInTo()
Once a member is found by authenticateRequest() pass it to this identity store
$this
setCascadeInTo(IdentityStore $cascadeInTo)
Set the name of the cookie used to store an login token
Member|null
authenticateRequest(HTTPRequest $request)
No description
logIn(Member $member, bool $persistent = false, HTTPRequest|null $request = null)
No description
logOut(HTTPRequest|null $request = null)
No description
protected
clearCookies()
Clear the cookies set for the user