From b7d170e92f2b886b7413f9401e81d4d5dadbe2e6 Mon Sep 17 00:00:00 2001 From: Sam Light Date: Thu, 11 Sep 2025 15:39:23 +0100 Subject: Fixed bugs with auth caching --- src/Middleware/ScormPlayerAuthMiddleware.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Middleware/ScormPlayerAuthMiddleware.php') diff --git a/src/Middleware/ScormPlayerAuthMiddleware.php b/src/Middleware/ScormPlayerAuthMiddleware.php index 0444f09..058a923 100644 --- a/src/Middleware/ScormPlayerAuthMiddleware.php +++ b/src/Middleware/ScormPlayerAuthMiddleware.php @@ -1,4 +1,4 @@ -user(); $authorized = Cache::remember( - 'scorm-player-authorize-{$user->id}_{$module->id}', + "scorm-player-authorize-{$user->id}_{$module->id}", $this->cacheTimeout, fn() => $this->authorize($request, $module) ); @@ -45,7 +45,7 @@ abstract class ScormPlayerAuthMiddleware protected function failedResponse() : Response { - return response('Not authorized', 503); + return response('Not authorized', 403); } protected function findModule(Request $request) : Scorm -- cgit v1.2.3