Laravel U2F support
Clone or download
lahaxearnaud Merge pull request #17 from asbiin/fix-model
Fix use of default Laravel model namespace
Latest commit feaedbd Jun 18, 2018

README.md

laravel-u2f

Scrutinizer Code Quality SensioLabsInsight

This PSR4 package provide u2f protocol integration in laravel 5 framework.

Requirements

  • A top level domain
  • HTTPS
  • PHP 7.* (If you want to use this package en php 5 you need to use the version v1.1.0)

Install

Via Composer

$ composer require lahaxearnaud/laravel-u2f

Provider

In the config/app.php file:

[
    //...
    Lahaxearnaud\U2f\U2fServiceProvider::class,
]

Alias

In the config/app.php file:

[
    //...
    'U2f' => Lahaxearnaud\U2f\U2fFacade::class,
]

Configs

$ php artisan vendor:publish --provider="Lahaxearnaud\U2f\U2fServiceProvider" --tag=config

Migrations

$ php artisan vendor:publish --provider="Lahaxearnaud\U2f\U2fServiceProvider" --tag=migrations
$ php artisan migrate

Middleware

In the app/Http/Kernel.php file

protected $routeMiddleware = [
    // ...
    \Lahaxearnaud\U2f\Http\Middleware\U2f::class,
];

Usage

Middleware

In the route.php file add the u2f middleware on your routes or groups:

    Route::get('admin/profile', ['middleware' => ['auth', 'u2f'], function () {
        //
    }]);

Configuration

Events

// to do

Change log

Please see CHANGELOG for more information what has changed recently.

Security

If you discover any security related issues, please email lahaxe[dot]arnaud[at]gmail[dot]com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

After coding

What better way to relax, after spending hours coding, than a good cocktail on the terrace?