Nextcloud PHP API (stable19)

IDeactivatableByAdmin extends IProvider

Marks a 2FA provider as activale by the administrator. This means that an admin can activate this provider without user interaction. The provider, therefore, must not require any user-provided configuration.

Tags
since
15.0.0

Table of Contents

EVENT_FAILED  = self::class . '::failed'
EVENT_SUCCESS  = self::class . '::success'
disableFor()  : void
Disable this provider for the given user.
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()  : 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
since
14.0.0

Methods

disableFor()

Disable this provider for the given user.

public disableFor(IUser $user) : void
Parameters
$user : IUser

the user to deactivate this provider for

Tags
since
15.0.0

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) : Template
Parameters
$user : IUser
Tags
since
9.1.0
Return values
Template

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

Search results