class VerifyHandler implements VerifyHandlerInterface (View source)

Handles verification requests using a time-based one-time password (TOTP) with the silverstripe/mfa module.

Traits

A class that can be instantiated or replaced via DI

Methods

static Injectable
create(mixed ...$args)

An implementation of the factory method, allows you to create an instance of a class

static Injectable
singleton(string $class = null)

Creates a class instance by the "singleton" design pattern.

array
start(StoreInterface $store, RegisteredMethod $method)

Stores any data required to handle a login process with a method, and returns relevant state to be applied to the front-end application managing the process.

verify(HTTPRequest $request, StoreInterface $store, RegisteredMethod $registeredMethod)

Verify the request has provided the right information to verify the member that aligns with any sessions state that may have been set prior

string
getComponent()

Get the key that a React UI component is registered under (with @silverstripe/react-injector on the front-end)

LoggerInterface|null
getLogger()

No description

setLogger(LoggerInterface $logger)

No description

Details

static Injectable create(mixed ...$args)

An implementation of the factory method, allows you to create an instance of a class

This method will defer class substitution to the Injector API, which can be customised via the Config API to declare substitution classes.

This can be called in one of two ways - either calling via the class directly, or calling on Object and passing the class name as the first parameter. The following are equivalent: $list = DataList::create(SiteTree::class); $list = SiteTree::get();

Parameters

mixed ...$args

Return Value

Injectable

static Injectable singleton(string $class = null)

Creates a class instance by the "singleton" design pattern.

It will always return the same instance for this class, which can be used for performance reasons and as a simple way to access instance methods which don't rely on instance data (e.g. the custom SilverStripe static handling).

Parameters

string $class

Optional classname to create, if the called class should not be used

Return Value

Injectable

The singleton instance

array start(StoreInterface $store, RegisteredMethod $method)

Stores any data required to handle a login process with a method, and returns relevant state to be applied to the front-end application managing the process.

Parameters

StoreInterface $store

An object that hold session data (and the Member) that can be mutated

RegisteredMethod $method

The RegisteredMethod instance that is being verified

Return Value

array

Props to be passed to a front-end component

Result verify(HTTPRequest $request, StoreInterface $store, RegisteredMethod $registeredMethod)

Verify the request has provided the right information to verify the member that aligns with any sessions state that may have been set prior

Parameters

HTTPRequest $request
StoreInterface $store
RegisteredMethod $registeredMethod

The RegisteredMethod instance that is being verified

Return Value

Result

string getComponent()

Get the key that a React UI component is registered under (with @silverstripe/react-injector on the front-end)

Return Value

string

LoggerInterface|null getLogger()

Return Value

LoggerInterface|null

VerifyHandler setLogger(LoggerInterface $logger)

Parameters

LoggerInterface $logger

Return Value

VerifyHandler