Skip to content

Commit

Permalink
Improve
Browse files Browse the repository at this point in the history
  • Loading branch information
milkmeowo committed Nov 10, 2016
1 parent 488095c commit 11c9f6d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Someline/Api/Auth/Provider/Passport.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

class Passport extends Authorization
{

/**
* Illuminate authentication manager.
*
Expand Down Expand Up @@ -48,11 +49,8 @@ public function __construct(AuthManager $auth)
*/
public function authenticate(Request $request, Route $route)
{
if (! $user = $this->auth->user()) {
throw new UnauthorizedHttpException(
get_class($this),
'Unable to authenticate with invalid API key and token.'
);
if ( ! $user = $this->auth->user()) {
throw new UnauthorizedHttpException(null, 'Unauthenticated.');
}

return $user;
Expand Down

0 comments on commit 11c9f6d

Please sign in to comment.