◆ at()
| OTPHP\OTP::at |
( |
int | $timestamp | ) |
|
◆ compareOTP()
| OTPHP\OTP::compareOTP |
( |
string | $safe, |
|
|
string | $user ) |
|
protected |
◆ filterOptions()
| OTPHP\OTP::filterOptions |
( |
array & | $options | ) |
|
|
protected |
◆ generateOTP()
| OTPHP\OTP::generateOTP |
( |
int | $input | ) |
|
|
protected |
- Parameters
-
- Return values
-
| string | The OTP at the specified input |
◆ generateURI()
| OTPHP\OTP::generateURI |
( |
string | $type, |
|
|
array | $options ) |
|
protected |
- Parameters
-
| string | $type | |
| array | $options | |
- Return values
-
◆ getDigest()
| OTPHP\OTPInterface::getDigest |
( |
| ) |
|
|
inherited |
- Return values
-
| string | Digest algorithm used to calculate the OTP. Possible values are 'md5', 'sha1', 'sha256' and 'sha512' |
◆ getDigits()
| OTPHP\OTPInterface::getDigits |
( |
| ) |
|
|
inherited |
- Return values
-
| int | Number of digits in the OTP |
◆ getIssuer()
| OTPHP\OTPInterface::getIssuer |
( |
| ) |
|
|
inherited |
◆ getLabel()
| OTPHP\OTPInterface::getLabel |
( |
| ) |
|
|
inherited |
- Return values
-
| string|null | The label of the OTP |
◆ getParameter()
| OTPHP\OTPInterface::getParameter |
( |
string | $parameter | ) |
|
|
inherited |
◆ getParameters()
| OTPHP\OTPInterface::getParameters |
( |
| ) |
|
|
inherited |
◆ getProvisioningUri()
| OTPHP\OTPInterface::getProvisioningUri |
( |
| ) |
|
|
inherited |
- Return values
-
| string | Get the provisioning URI |
Implemented in OTPHP\TOTP.
◆ getQrCodeUri()
| OTPHP\OTP::getQrCodeUri |
( |
string | $uri = 'https://chart.googleapis.com/chart?chs=200x200&chld=M|0&cht=qr&chl={PROVISIONING_URI}', |
|
|
string | $placeholder = '{PROVISIONING_URI}' ) |
{
- Parameters
-
| string | $uri | The Uri of the QRCode generator with all parameters. By default the Googgle Chart API is used. This Uri MUST contain a placeholder that will be replaced by the method. |
| string | $placeholder | The placeholder to be replaced in the QR Code generator URI. Default value is {PROVISIONING_URI}. |
- Return values
-
| string | Get the provisioning URI |
}
Implements OTPHP\OTPInterface.
◆ getSecret()
| OTPHP\OTPInterface::getSecret |
( |
| ) |
|
|
inherited |
- Return values
-
| string | The secret of the OTP |
◆ hasParameter()
| OTPHP\OTPInterface::hasParameter |
( |
string | $parameter | ) |
|
|
inherited |
◆ isIssuerIncludedAsParameter()
| OTPHP\OTPInterface::isIssuerIncludedAsParameter |
( |
| ) |
|
|
inherited |
- Return values
-
| bool | If true, the issuer will be added as a parameter in the provisioning URI |
◆ setIssuer()
| OTPHP\OTPInterface::setIssuer |
( |
string | $issuer | ) |
|
|
inherited |
◆ setIssuerIncludedAsParameter()
| OTPHP\OTPInterface::setIssuerIncludedAsParameter |
( |
bool | $issuer_included_as_parameter | ) |
|
|
inherited |
- Parameters
-
| bool | $issuer_included_as_parameter | |
- Return values
-
◆ setLabel()
| OTPHP\OTPInterface::setLabel |
( |
string | $label | ) |
|
|
inherited |
- Parameters
-
| string | $label | The label of the OTP |
◆ setParameter()
| OTPHP\OTPInterface::setParameter |
( |
string | $parameter, |
|
|
| $value ) |
|
inherited |
- Parameters
-
| string | $parameter | |
| mixed | $value | |
- Return values
-
◆ verify()
| OTPHP\OTPInterface::verify |
( |
string | $otp, |
|
|
| $input = null, |
|
|
| $window = null ) |
|
inherited |
Verify that the OTP is valid with the specified input.
If no input is provided, the input is set to a default value or false is returned.
- Parameters
-
| string | $otp | |
| int | null | $input | |
| int | null | $window | |
- Return values
-
Implemented in OTPHP\TOTP.
The documentation for this class was generated from the following file:
- admin/tool/mfa/factor/totp/extlib/OTPHP/OTP.php