Set up a TOTP generator for a user
Definition at line 12 of file TOTP.php.
◆ __construct()
__construct |
( |
array | $settings | ) |
|
Initialize the TOTP setup
- Parameters
-
$settings | array The settings array |
Definition at line 22 of file TOTP.php.
◆ getQRCode()
Get the TOTP QR-Code ready for any Authenticator-App
- Returns
- string Base64 encoded SVG image url e.g. data:image/svg+xml;base64,PD94...
Definition at line 51 of file TOTP.php.
◆ getSecret()
Get the TOTP Secret
- Returns
- string TOTP secret
Definition at line 44 of file TOTP.php.
◆ getURI()
Get the TOTP URI
- Returns
- string TOTP URI
Definition at line 37 of file TOTP.php.
◆ setUserId()
Set the userid
- Parameters
-
- Returns
- void
Definition at line 30 of file TOTP.php.
◆ start()
Set up a TOTP token for a user. You can get the URI via the getURI() command, the TOTP secret via the getSecret() command or the QR-Code via the getQRCode() command
- Returns
- void
- Exceptions
-
Definition at line 61 of file TOTP.php.
◆ verify()
Verify the TOTP method creation. You can only use this function to finish the TOTP setup. To verify the Code after login, use the 'Create' class in 'Session'.
- Parameters
-
- Returns
- bool Is the TOTP code correct?
Definition at line 95 of file TOTP.php.
The documentation for this class was generated from the following file: