\OCP\Authentication\TwoFactorAuthIProvider2

Summary

Methods
Constants
getId()
getDisplayName()
getDescription()
getTemplate()
verifyChallenge()
isTwoFactorAuthEnabledForUser()
getCSP()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

getId()

getId() : string

Get unique identifier of this 2FA provider

Returns

string

getDisplayName()

getDisplayName() : string

Get the display name for selecting the 2FA provider

Example: "Email"

Returns

string

getDescription()

getDescription() : string

Get the description for selecting the 2FA provider

Example: "Get a token via e-mail"

Returns

string

getTemplate()

getTemplate(\OCP\IUser  $user) : \OCP\Template

Get the template for rending the 2FA provider view

Parameters

\OCP\IUser $user

Returns

\OCP\Template

verifyChallenge()

verifyChallenge(\OCP\IUser  $user, string  $challenge) 

Verify the given challenge

Parameters

\OCP\IUser $user
string $challenge

isTwoFactorAuthEnabledForUser()

isTwoFactorAuthEnabledForUser(\OCP\IUser  $user) : boolean

Decides whether 2FA is enabled for the given user

Parameters

\OCP\IUser $user

Returns

boolean

getCSP()

getCSP() : \OCP\AppFramework\Http\ContentSecurityPolicy

Get the Content Security Policy for the template (required for showing external content, otherwise optional)

Returns

\OCP\AppFramework\Http\ContentSecurityPolicy