trait VerificationHandlerTrait (View source)

This trait encapsulates logic that can be added to a RequestHandler to work with logging in using MFA front-end app. It provides two main methods; createStartVerificationResponse - a response that can be easily consumed by the MFA app to prompt a login, and completeVerificationRequest - used to verify a request sent by the MFA app containing the login attempt.

Methods

protected
createStartVerificationResponse(StoreInterface $store, MethodInterface|null $requestedMethod = null)

Create an HTTPResponse that provides information to the client side React MFA app to prompt the user to login with their configured MFA method

protected
completeVerificationRequest(StoreInterface $store, HTTPRequest $request)

Attempt to verify a login attempt provided by the given request

protected
bool
isVerificationComplete(StoreInterface $store)

Indicates the current member has verified with MFA methods enough to be considered "verified"

Details

protected HTTPResponse createStartVerificationResponse(StoreInterface $store, MethodInterface|null $requestedMethod = null)

Create an HTTPResponse that provides information to the client side React MFA app to prompt the user to login with their configured MFA method

Parameters

StoreInterface $store
MethodInterface|null $requestedMethod

Return Value

HTTPResponse

protected Result completeVerificationRequest(StoreInterface $store, HTTPRequest $request)

Attempt to verify a login attempt provided by the given request

Parameters

StoreInterface $store
HTTPRequest $request

Return Value

Result

Exceptions

InvalidMethodException

protected bool isVerificationComplete(StoreInterface $store)

Indicates the current member has verified with MFA methods enough to be considered "verified"

Parameters

StoreInterface $store

Return Value

bool