Monarobase / Yubikey by Monarobase

Yubikey for Laravel 4
419
9
2
Package Data
Maintainer Username: Monarobase
Maintainer Contact: jonathan@monarobase.net (Jonathan Thuau)
Package Create Date: 2013-11-18
Package Last Update: 2019-02-08
Language: PHP
License: MIT
Last Refreshed: 2024-12-11 15:07:36
Package Statistics
Total Downloads: 419
Monthly Downloads: 2
Daily Downloads: 0
Total Stars: 9
Total Watchers: 2
Total Forks: 2
Total Open Issues: 1

Yubikey

Yubikey for Laravel 4

Increase the security of your forms with ease using a USB key

Buy a Yubikey

Yubico API Key Generator

Installation

Add monarobase/yubikey to composer.json.

"monarobase/yubikey": "dev-master"

Run composer update to pull down the latest version of Yubikey.

Now open up app/config/app.php and add the service provider to your providers array.

'providers' => array(
	'Monarobase\Yubikey\YubikeyServiceProvider',
)

Now add the alias.

'aliases' => array(
	'Yubikey' => 'Monarobase\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 config:publish monarobase/yubikey and modify the config file with your own information.

Example

try
{
	$yubikey_auth = Yubikey::verify(Input::get('otp'));
	$yubikey_params = Yubikey::getParameters();
	$yubikey_identity = Yubikey::getParameter('identity');
}
catch (Exception $e)
{
	$error = $e->getMessage();
}