Method
class Method implements MethodInterface (View source)
Enables time-based one-time password (TOTP) authentication for the silverstripe/mfa module.
Traits
Provides extensions to this object to integrate it with standard config API methods.
Config options
code_length | int | The TOTP code length |
Properties
Methods
Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).
Gets the uninherited value for the given config option
Get a URL segment for this method. This will be used in URL paths for performing authentication by this method
Return the VerifyHandler that is used to start and check verification attempts with this method
Return the RegisterHandler that is used to perform registrations with this method
Return a URL to an image to be used as a thumbnail in the MFA login/registration grid for all MFA methods
Leverage the Requirements API to ensure client requirements are included. This is called just after the base module requirements are specified
TOTP authentication is only available if the required environment variable is set to enable encryption.
If not available to be used, provide a message to display on the frontend to explain why.
Details
static Config_ForClass
config()
Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).
mixed
stat(string $name)
deprecated
deprecated
Get inherited config value
mixed
uninherited(string $name)
Gets the uninherited value for the given config option
$this
set_stat(string $name, mixed $value)
deprecated
deprecated
Update the config value for a given property
string
getName()
Provide a localised name for this MFA Method.
eg. "Authenticator app"
string
getURLSegment()
Get a URL segment for this method. This will be used in URL paths for performing authentication by this method
VerifyHandlerInterface
getVerifyHandler()
Return the VerifyHandler that is used to start and check verification attempts with this method
RegisterHandlerInterface
getRegisterHandler()
Return the RegisterHandler that is used to perform registrations with this method
string
getThumbnail()
Return a URL to an image to be used as a thumbnail in the MFA login/registration grid for all MFA methods
void
applyRequirements()
Leverage the Requirements API to ensure client requirements are included. This is called just after the base module requirements are specified
bool
isAvailable()
TOTP authentication is only available if the required environment variable is set to enable encryption.
string
getUnavailableMessage()
If not available to be used, provide a message to display on the frontend to explain why.
int
getCodeLength()
Get the length of the TOTP code