marcinkozak / yubikey
Yubikey for Laravel 5
dev-master
2016-05-18 09:17 UTC
Requires
- php: >=5.4.0
- illuminate/support: ~5
This package is not auto-updated.
Last update: 2024-12-11 20:14:01 UTC
README
Yubikey for Laravel 5
This package contain fixes which have been found on the bitbeans/Yubikey Repository.
Installation
Add marcinkozak/yubikey
to composer.json
.
"marcinkozak/yubikey": "dev-master"
Run composer update
to pull down the latest version of Yubikey.
Now open up PROJECTFOLDER/config/app.php
and add the service provider to your providers
array.
'providers' => array( 'MarcinKozak\Yubikey\YubikeyServiceProvider', )
And also the alias.
'aliases' => array( 'Yubikey' => 'MarcinKozak\Yubikey\YubikeyFacade', )
You can easily integrate the Yubikey Verification into your authentication system in two steps :
- Add a field (eg
yubikey_identity
) in your user table - now check your user with username/email + password + yubikey_identity
Configuration
Run php artisan vendor:publish
and modify the config file (PROJECTFOLDER/config/yubikey.php) with your own information.
Example
use YubiKey; try { $yubikey_auth = Yubikey::verify(Input::get('otp')); $yubikey_params = Yubikey::getParameters(); $yubikey_identity = Yubikey::getParameter('identity'); } catch (\Exception $e) { $error = $e->getMessage(); }