PHP code example of rapide / yubikey
1. Go to this page and download the library: Download rapide/yubikey library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
rapide / yubikey example snippets
'providers' => [
Bitbeans\Yubikey\YubikeyServiceProvider::class,
]
'aliases' => [
'Yubikey' => Bitbeans\Yubikey\YubikeyFacade::class,
]
use YubiKey;
try {
$yubikey_auth = Yubikey::verify(Input::get('otp'));
$yubikey_params = Yubikey::getParameters();
$yubikey_identity = Yubikey::getParameter('identity');
} catch (\Exception $exception) {
$error = $e->getMessage();
}