LDAP Account Manager

TwoFactorProvider
in

2-factor authentication

Tags
author

Roland Gruber

Table of Contents

addCustomInput()  : mixed
Adds the custom input fields to the form.
getSerials()  : array<string|int, string>
Returns a list of serial numbers of the user's tokens.
hasCustomInputForm()  : has
Returns if the service has a custom input form.
isShowSubmitButton()  : bool
Returns if the submit button should be shown.
verify2ndFactor()  : bool
Verifies if the provided 2nd factor is valid.

Methods

addCustomInput()

Adds the custom input fields to the form.

public addCustomInput(htmlResponsiveRow &$row, string $userDn) : mixed
Parameters
$row : htmlResponsiveRow

row where to add the input fields

$userDn : string

user DN

Return values
mixed

getSerials()

Returns a list of serial numbers of the user's tokens.

public getSerials(string $user, string $password) : array<string|int, string>
Parameters
$user : string

user name

$password : string

password

Tags
throws
Exception

error getting serials

Return values
array<string|int, string>

serials

hasCustomInputForm()

Returns if the service has a custom input form.

public hasCustomInputForm() : has

In this case the token field is not displayed.

Return values
has

custom input form

isShowSubmitButton()

Returns if the submit button should be shown.

public isShowSubmitButton() : bool
Return values
bool

show submit button

verify2ndFactor()

Verifies if the provided 2nd factor is valid.

public verify2ndFactor(string $user, string $password, string $serial, string $twoFactorInput) : bool
Parameters
$user : string

user name

$password : string

password

$serial : string

serial number of token

$twoFactorInput : string

input for 2nd factor

Tags
throws
Exception

error during check

Return values
bool

true if verified and false if verification failed

Search results