Skip to content

Commit

Permalink
fix + new middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
glena committed Jul 11, 2016
1 parent 330b9d2 commit 935ab4d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Auth0/Login/Middleware/ForceAuthMiddleware.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php namespace Auth0\Login\Middleware;

class ForceAuthMiddleware {

public function handle($request, \Closure $next)
{
if ( ! \Auth::check()) {
return \Response::make("Unauthorized user", 401);
}

return $next($request);
}

}

0 comments on commit 935ab4d

Please sign in to comment.