Skip to content

Commit

Permalink
Implement laravel-challenge.
Browse files Browse the repository at this point in the history
  • Loading branch information
olsgreen committed Apr 19, 2020
1 parent 827b8ac commit e7d83c6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class Kernel extends HttpKernel
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
// \Illuminate\Session\Middleware\AuthenticateSession::class,
\BoxedCode\Laravel\Auth\Challenge\Http\Middleware\RequireAuthentication::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
Expand Down
6 changes: 4 additions & 2 deletions app/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

namespace App;

use BoxedCode\Laravel\Auth\Challenge\Challengeable;
use BoxedCode\Laravel\Auth\Challenge\Contracts\Challengeable as ChallengeableContract;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;

class User extends Authenticatable
class User extends Authenticatable implements ChallengeableContract
{
use Notifiable;
use Notifiable, Challengeable;

/**
* The attributes that are mass assignable.
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"license": "MIT",
"require": {
"php": "^7.2.5",
"boxed-code/laravel-challenge": "~4.0",
"fideloper/proxy": "^4.2",
"fruitcake/laravel-cors": "^1.0",
"guzzlehttp/guzzle": "^6.3",
Expand Down

0 comments on commit e7d83c6

Please sign in to comment.