Nextcloud PHP API (master)

IStatelessProvider extends IProvider

Marks the 2FA provider stateless. That means the state of 2FA activation for user will be checked dynamically and not stored in the database.

Tags
since
35.0.0
Attributes
#[Implementable]
$since: '35.0.0'

Table of Contents

Methods

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
getTemplate()  : ITemplate
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

Methods

getDescription()

Get the description for selecting the 2FA provider

public getDescription() : string

Example: "Get a token via e-mail"

Tags
since
9.1.0
Return values
string

getDisplayName()

Get the display name for selecting the 2FA provider

public getDisplayName() : string

Example: "Email"

Tags
since
9.1.0
Return values
string

getId()

Get unique identifier of this 2FA provider

public getId() : string
Tags
since
9.1.0
Return values
string

getTemplate()

Get the template for rending the 2FA provider view

public getTemplate(IUser $user) : ITemplate
Parameters
$user : IUser
Tags
since
9.1.0
32.0.0

Broader return type ITemplate instead of \OCP\Template.

Return values
ITemplate

isTwoFactorAuthEnabledForUser()

Decides whether 2FA is enabled for the given user

public isTwoFactorAuthEnabledForUser(IUser $user) : bool
Parameters
$user : IUser
Tags
since
9.1.0
Return values
bool

verifyChallenge()

Verify the given challenge

public verifyChallenge(IUser $user, string $challenge) : bool
Parameters
$user : IUser
$challenge : string
Tags
since
9.1.0
Return values
bool
On this page

Search results