ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Class for verifying Yubico One-Time-Passcodes. More...
Public Member Functions | |
__construct ($id, $key='') | |
Constructor. More... | |
getLastResponse () | |
Return the last data received from the server, if any. More... | |
verify ($token) | |
Verify Yubico OTP. More... | |
Private Attributes | |
$_id | |
$_key | |
$_response | |
Class for verifying Yubico One-Time-Passcodes.
Simple example: require_once 'Auth/Yubico.php'; $yubi = &new Auth_Yubico('42'); $auth = $yubi->verify("ccbbddeertkrctjkkcglfndnlihhnvekchkcctif"); if (PEAR::isError($auth)) { print "<p>Authentication failed: " . $auth->getMessage(); print "<p>Debug output from server: " . $yubi->getLastResponse(); } else { print "<p>You are authenticated!"; }
Definition at line 59 of file Yubico.php.
Auth_Yubico::__construct | ( | $id, | |
$key = '' |
|||
) |
Constructor.
Sets up the object
string | The client identity |
string | The client MAC key (optional) public |
Definition at line 91 of file Yubico.php.
Auth_Yubico::getLastResponse | ( | ) |
Return the last data received from the server, if any.
Definition at line 103 of file Yubico.php.
References $_response.
Auth_Yubico::verify | ( | $token | ) |
Verify Yubico OTP.
string | $token | Yubico OTP |
Definition at line 117 of file Yubico.php.
References $out, $response, $row, $rows, PHPMailer\PHPMailer\$token, $url, and SimpleSAML\Utils\HTTP\fetch().
|
private |
Definition at line 69 of file Yubico.php.
|
private |
Definition at line 75 of file Yubico.php.
|
private |
Definition at line 81 of file Yubico.php.
Referenced by getLastResponse().