class SessionStore implements StoreInterface (View source)

This class provides an interface to store data in session during an MFA process. This is implemented as a measure to prevent bleeding state between individual MFA auth types

Constants

SESSION_KEY

Methods

__construct(Member $member)

Attempt to create a store from the given request getting any existing state from the session of the request

Member|null
getMember()

No description

setMember(Member $member)

No description

string|null
getMethod()

No description

setMethod(string|null $method)

No description

array
getState()

Get the state from the store

setState(array $state)

Update the state in the store. Will override existing state. To add to the existing state use addState().

addState(array $state)

Add to the state in the store

addVerifiedMethod(string $method)

Add and keep track of methods that have been verified

array
getVerifiedMethods()

Get the list of methods that have been verified

save(HTTPRequest $request)

Save this store into the session of the given request

static StoreInterface|null
load(HTTPRequest $request)

Load a StoreInterface from the given request and return it if it exists

static void
clear(HTTPRequest $request)

Clear any stored values for the given request

array
__serialize()

No description

void
__unserialize(array $data)

No description

Details

__construct(Member $member)

Attempt to create a store from the given request getting any existing state from the session of the request

{@inheritdoc}

Parameters

Member $member

Member|null getMember()

Return Value

Member|null

StoreInterface setMember(Member $member)

Parameters

Member $member

Return Value

StoreInterface

string|null getMethod()

Return Value

string|null

StoreInterface setMethod(string|null $method)

Parameters

string|null $method

Return Value

StoreInterface

array getState()

Get the state from the store

Return Value

array

StoreInterface setState(array $state)

Update the state in the store. Will override existing state. To add to the existing state use addState().

Parameters

array $state

Return Value

StoreInterface

StoreInterface addState(array $state)

Add to the state in the store

Parameters

array $state

Return Value

StoreInterface

StoreInterface addVerifiedMethod(string $method)

Add and keep track of methods that have been verified

Parameters

string $method

Return Value

StoreInterface

array getVerifiedMethods()

Get the list of methods that have been verified

Return Value

array

StoreInterface save(HTTPRequest $request)

Save this store into the session of the given request

{@inheritdoc}

Parameters

HTTPRequest $request

Return Value

StoreInterface

static StoreInterface|null load(HTTPRequest $request)

Load a StoreInterface from the given request and return it if it exists

Parameters

HTTPRequest $request

Return Value

StoreInterface|null

static void clear(HTTPRequest $request)

Clear any stored values for the given request

{@inheritdoc}

Parameters

HTTPRequest $request

Return Value

void

array __serialize()

Return Value

array

void __unserialize(array $data)

Parameters

array $data

Return Value

void