diff --git a/src/Someline/Api/Auth/Provider/Passport.php b/src/Someline/Api/Auth/Provider/Passport.php index 5ced6f3..3211595 100644 --- a/src/Someline/Api/Auth/Provider/Passport.php +++ b/src/Someline/Api/Auth/Provider/Passport.php @@ -14,6 +14,7 @@ class Passport extends Authorization { + /** * Illuminate authentication manager. * @@ -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;