IProvidesIcons extends IProvider
Interface for two-factor providers that provide dark and light provider icons
Tags
Table of Contents
- EVENT_FAILED = self::class . '::failed'
- EVENT_SUCCESS = self::class . '::success'
- getDarkIcon() : string
- Get the path to the dark (black) icon of this provider
- getDescription() : string
- Get the description for selecting the 2FA provider
- getDisplayName() : string
- Get the display name for selecting the 2FA provider
- getId() : string
- Get unique identifier of this 2FA provider
- getLightIcon() : string
- Get the path to the light (white) icon of this provider
- getTemplate() : Template
- Get the template for rending the 2FA provider view
- isTwoFactorAuthEnabledForUser() : bool
- Decides whether 2FA is enabled for the given user
- verifyChallenge() : bool
- Verify the given challenge
Constants
EVENT_FAILED
public
mixed
EVENT_FAILED
= self::class . '::failed'
EVENT_SUCCESS
public
mixed
EVENT_SUCCESS
= self::class . '::success'
Tags
Methods
getDarkIcon()
Get the path to the dark (black) icon of this provider
public
getDarkIcon() : string
Tags
Return values
string —getDescription()
Get the description for selecting the 2FA provider
public
getDescription() : string
Example: "Get a token via e-mail"
Tags
Return values
string —getDisplayName()
Get the display name for selecting the 2FA provider
public
getDisplayName() : string
Example: "Email"
Tags
Return values
string —getId()
Get unique identifier of this 2FA provider
public
getId() : string
Tags
Return values
string —getLightIcon()
Get the path to the light (white) icon of this provider
public
getLightIcon() : string
Tags
Return values
string —getTemplate()
Get the template for rending the 2FA provider view
public
getTemplate(IUser $user) : Template
Parameters
- $user : IUser
Tags
Return values
Template —isTwoFactorAuthEnabledForUser()
Decides whether 2FA is enabled for the given user
public
isTwoFactorAuthEnabledForUser(IUser $user) : bool
Parameters
- $user : IUser
Tags
Return values
bool —verifyChallenge()
Verify the given challenge
public
verifyChallenge(IUser $user, string $challenge) : bool
Parameters
- $user : IUser
- $challenge : string