Package Data | |
---|---|
Maintainer Username: | mkozak |
Maintainer Contact: | jonathan@monarobase.net (Jonathan Thuau) |
Package Create Date: | 2016-05-13 |
Package Last Update: | 2016-05-18 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-14 15:07:14 |
Package Statistics | |
---|---|
Total Downloads: | 7,858 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Yubikey for Laravel 5
This package contain fixes which have been found on the bitbeans/Yubikey Repository.
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 :
yubikey_identity
) in your user tableRun php artisan vendor:publish
and modify the config file (PROJECTFOLDER/config/yubikey.php) with your own information.
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();
}