VerifyHandler
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
Properties
protected | LoggerInterface | $logger |
Methods
An implementation of the factory method, allows you to create an instance of a class
Creates a class instance by the "singleton" design pattern.
Gets the encryption key to use from environment variables. This is generated by default on the Common Web Platform, but can be defined as a custom value if required.
Get an instance of the TOTP handler service. The secret must already be defined and set to the StoreInterface.
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 the request has provided the right information to verify the member that aligns with any sessions state that may have been set prior
Get the key that a React UI component is registered under (with @silverstripe/react-injector on the front-end)
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();
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).
protected string
getEncryptionKey()
Gets the encryption key to use from environment variables. This is generated by default on the Common Web Platform, but can be defined as a custom value if required.
protected TOTPInterface
getTotp(StoreInterface $store)
Get an instance of the TOTP handler service. The secret must already be defined and set to the StoreInterface.
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.
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
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
VerifyHandler
setLogger(LoggerInterface $logger)
No description