This PSR4 package provide u2f protocol integration in laravel 5 framework.
Via Composer
$ composer require lahaxearnaud/laravel-u2f
In the config/app.php file:
[
//...
"Lahaxeanaud\U2f\LaravelU2fServiceProvider"
]
In the config/app.php file:
[
//...
'U2f' => 'Lahaxeanaud\U2f\LaravelU2fServiceFacade'
]
$ php artisan vendor:publish --provider="Lahaxeanaud\U2f\LaravelU2fServiceProvider" --tag=config
$ php artisan migrate
$ php artisan vendor:publish --provider="Lahaxeanaud\U2f\LaravelU2fServiceProvider" --tag=migrations
$ php artisan migrate
In the app/Http/Kernel.php file
protected $routeMiddleware = [
// ...
'u2f' => 'Lahaxeanaud\U2f\Http\Middleware\U2f',
];
In the route.php file add the u2f middleware on your routes or groups:
Route::get('admin/profile', ['middleware' => ['auth', 'u2f'], function () {
//
}]);
// to do
Please see CHANGELOG for more information what has changed recently.
If you discover any security related issues, please email lahaxe[dot]arnaud[at]gmail[dot]com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.