From d24e83e0ae78d711e86b4dc21446d737193d3214 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Fri, 22 May 2015 15:11:44 +0100 Subject: [PATCH] Account for BasicAuth within ApiAuthenticate --- app/Http/Middleware/ApiAuthenticate.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Http/Middleware/ApiAuthenticate.php b/app/Http/Middleware/ApiAuthenticate.php index 236cc97c..0a0f2f8d 100644 --- a/app/Http/Middleware/ApiAuthenticate.php +++ b/app/Http/Middleware/ApiAuthenticate.php @@ -58,6 +58,8 @@ class ApiAuthenticate 'status_code' => 401, ], 401); } + } elseif ($user = $request->getUser()) { + $this->auth->onceBasic(); } else { return response()->json([ 'message' => 'You are not authorized to view this content.',