class CookieAuthenticationHandler implements AuthenticationHandler (View source)

Authenticate a member passed on a session cookie

Methods

public
string
getDeviceCookieName()

Get the name of the cookie used to track this device

public
$this
setDeviceCookieName(string $deviceCookieName)

Set the name of the cookie used to track this device

public
string
getTokenCookieName()

Get the name of the cookie used to store an login token

public
$this
setTokenCookieName(string $tokenCookieName)

Set the name of the cookie used to store an login token

public
string
getTokenCookieSecure()

Get the name of the cookie used to store an login token

public
$this
setTokenCookieSecure(string $tokenCookieSecure)

Set cookie with HTTPS only flag

public
getCascadeInTo()

Once a member is found by authenticateRequest() pass it to this identity store

public
$this
setCascadeInTo(IdentityStore $cascadeInTo)

Set the name of the cookie used to store an login token

public
Member|null
authenticateRequest(HTTPRequest $request)

No description

public
logIn(Member $member, bool $persistent = false, HTTPRequest $request = null)

No description

public
logOut(HTTPRequest $request = null)

No description

protected
clearCookies()

Clear the cookies set for the user

Details

string getDeviceCookieName()

Get the name of the cookie used to track this device

Return Value

string

$this setDeviceCookieName(string $deviceCookieName)

Set the name of the cookie used to track this device

Parameters

string $deviceCookieName

Return Value

$this

string getTokenCookieName()

Get the name of the cookie used to store an login token

Return Value

string

$this setTokenCookieName(string $tokenCookieName)

Set the name of the cookie used to store an login token

Parameters

string $tokenCookieName

Return Value

$this

string getTokenCookieSecure()

Get the name of the cookie used to store an login token

Return Value

string

$this setTokenCookieSecure(string $tokenCookieSecure)

Set cookie with HTTPS only flag

Parameters

string $tokenCookieSecure

Return Value

$this

IdentityStore getCascadeInTo()

Once a member is found by authenticateRequest() pass it to this identity store

Return Value

IdentityStore

$this setCascadeInTo(IdentityStore $cascadeInTo)

Set the name of the cookie used to store an login token

Parameters

IdentityStore $cascadeInTo

Return Value

$this

Member|null authenticateRequest(HTTPRequest $request)

No description

Parameters

HTTPRequest $request

The current HTTP request

Return Value

Member|null

The authenticated Member, or null if this auth mechanism isn't used.

logIn(Member $member, bool $persistent = false, HTTPRequest $request = null)

No description

Parameters

Member $member

The member to log in.

bool $persistent

boolean If set to true, the login may persist beyond the current session.

HTTPRequest $request

The request of the visitor that is logging in, to get, for example, cookies.

logOut(HTTPRequest $request = null)

No description

Parameters

HTTPRequest $request

The request of the visitor that is logging out, to get, for example, cookies.

protected clearCookies()

Clear the cookies set for the user