bitbeans / yubikey
Yubikey for Laravel
Installs: 140 302
Dependents: 0
Suggesters: 0
Security: 0
Stars: 42
Watchers: 6
Forks: 9
Open Issues: 0
pkg:composer/bitbeans/yubikey
Requires
- php: >=5.4.0
- illuminate/support: >=5
This package is auto-updated.
Last update: 2025-10-29 01:39:39 UTC
README
Yubikey for Laravel 5
This package is based on the Laravel 4 package by Monarobase.
Installation
Add bitbeans/yubikey to composer.json.
"bitbeans/yubikey": "dev-master"
Run composer update to pull down the latest version of Yubikey.
Now open up /config/app.php and add the service provider to your providers array.
'providers' => [ Bitbeans\Yubikey\YubikeyServiceProvider::class, ]
And also the alias.
'aliases' => [ 'Yubikey' => Bitbeans\Yubikey\YubikeyFacade::class, ]
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 $exception) { $error = $e->getMessage(); }