2017 © Pedro Peláez
 

library laravel-u2f

U2F support for laravel 5

image

lahaxearnaud/laravel-u2f

U2F support for laravel 5

  • Tuesday, June 19, 2018
  • by lahaxearnaud
  • Repository
  • 3 Watchers
  • 22 Stars
  • 1,326 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 14 Forks
  • 3 Open issues
  • 11 Versions
  • 183 % Grown

The README.md

laravel-u2f

Scrutinizer Code Quality SensioLabsInsight, (*1)

This PSR4 package provide u2f protocol integration in laravel 6 framework., (*2)

Requirements

  • A top level domain
  • HTTPS
  • PHP >= 7.2 (If you want to use this package with php 5 you need to use the version v1.1.0)

Install

Via Composer, (*3)

$ composer require lahaxearnaud/laravel-u2f

Laravel 5.5+ uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider., (*4)

Configs

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

Assets

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

Views

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

Note that default views use Laravel's default Bootstrap 4. If you don't use it, you have to update the views., (*5)

Migrations

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

Middleware

In the app/Http/Kernel.php file, (*6)

 protected $routeMiddleware = [
    'auth' => \App\Http\Middleware\Authenticate::class,
    // ...
    'u2f' => \Lahaxearnaud\U2f\Http\Middleware\U2f::class,
    ];

Usage

A example project is available to help you with the configuration / usage., (*7)

Middleware

In the route.php file add the u2f middleware on your routes or groups:, (*8)

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

In controller:, (*9)

/**
 * Create a new controller instance.
 *
 * @return void
 */
public function __construct()
{
    $this->middleware(['auth', 'u2f']);
}

Configuration

Events

  • Name: u2f.authentication, (*10)

    Payload: [ 'u2fKey' => $key, 'user' => Auth::user() ], (*11)

    Description: An user authenticate himself with a valid u2f key, (*12)

  • Name: u2f.register, (*13)

    Payload [ 'u2fKey' => $key, 'user' => Auth::user() ], (*14)

    Description: An user register a new u2f key, (*15)

Changelog

Please see CHANGELOG for more information what has changed recently., (*16)

Security

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

Credits

License

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

After coding

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

The Versions

19/06 2018

dev-master

9999999-dev https://github.com/lahaxearnaud/laravel-u2f

U2F support for laravel 5

  Sources   Download

MIT

The Requires

 

security otp u2f

19/06 2018

v1.3.0

1.3.0.0 https://github.com/lahaxearnaud/laravel-u2f

U2F support for laravel 5

  Sources   Download

MIT

The Requires

 

security otp u2f

23/04 2018

v1.2.0

1.2.0.0 https://github.com/lahaxearnaud/laravel-u2f

U2F support for laravel 5

  Sources   Download

MIT

The Requires

 

security otp u2f

22/04 2018

v1.1.0

1.1.0.0 https://github.com/lahaxearnaud/laravel-u2f

U2F support for laravel 5

  Sources   Download

MIT

The Requires

 

security otp u2f

04/10 2017

v1.0.0

1.0.0.0 https://github.com/lahaxearnaud/laravel-u2f

U2F support for laravel 5

  Sources   Download

MIT

The Requires

 

security otp u2f

26/10 2015

v0.5

0.5.0.0 https://github.com/lahaxearnaud/laravel-u2f

U2F support for laravel 5

  Sources   Download

MIT

The Requires

 

security otp u2f

21/05 2015

v0.4

0.4.0.0 https://github.com/lahaxearnaud/laravel-u2f

U2F support for laravel 5

  Sources   Download

MIT

The Requires

 

security otp u2f

21/05 2015

v0.3

0.3.0.0 https://github.com/lahaxearnaud/laravel-u2f

U2F support for laravel 5

  Sources   Download

MIT

The Requires

 

security otp u2f

21/05 2015

v0.2

0.2.0.0 https://github.com/lahaxearnaud/laravel-u2f

U2F support for laravel 5

  Sources   Download

MIT

The Requires

 

security otp u2f

20/05 2015

v0.1.1

0.1.1.0 https://github.com/lahaxearnaud/laravel-u2f

U2F support for laravel 5

  Sources   Download

MIT

The Requires

 

security otp u2f

20/05 2015

v0.1.0

0.1.0.0 https://github.com/lahaxearnaud/laravel-u2f

U2F support for laravel 5

  Sources   Download

MIT

The Requires

 

security otp u2f