24/08
2016
dev-master
9999999-devComponent wrapper for the enygma/yubikey library
MIT
The Requires
by Eric Bus
Component wrapper for the enygma/yubikey library
Get your API key and client ID from https://upgrade.yubico.com/getapikey/., (*1)
// app/config/main.php return [ ... 'components' => [ ... 'yubikey' => [ 'class' => 'websightnl\yii2yubikey\Yubikey', 'apiKey' => '', 'clientId' => '', ] ... ] ... ];
$status = Yii::$app->yubikey->validate('tokenfromuser');
The component supports most of the parameters of the original library. For more information, please see https://github.com/enygma/yubikey., (*2)
// app/config/main.php return [ ... 'components' => [ ... 'yubikey' => [ 'class' => 'websightnl\yii2yubikey\Yubikey', 'apiKey' => '', 'clientId' => '', // Enable HTTPS for the connection (defaults to true) 'secure' => true, // Custom list of validation hosts 'hosts' => ['validate1.example.org', 'validate2.example.org'], // Additonally, the library also supports simultaneous connections to multiple servers. 'multiServer' => false // Additionally, you can also switch on and off this aggregation of the results and go with only the "first in" response 'firstIn' => true ] ... ] ... ];
Component wrapper for the enygma/yubikey library
MIT