From aebfc08edf9c811421b9a84a043faae0b4a7ce64 Mon Sep 17 00:00:00 2001 From: Dita Aji Pratama Date: Thu, 1 May 2025 20:34:52 +0700 Subject: [PATCH] Implementing Bearer for logout --- modules/api/auth.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/api/auth.py b/modules/api/auth.py index 8b61510..d4aff54 100644 --- a/modules/api/auth.py +++ b/modules/api/auth.py @@ -433,7 +433,9 @@ class auth: APIADDR = "/api/auth/logout" loggorilla.prcss(APIADDR, "Define parameters") response = {} - jwt = params["jwt" ] + loggorilla.prcss(APIADDR, "Extract the Authorization token from Header") + auth_header = request.get_header('Authorization') + jwt = auth_header.split(' ')[1] payload = tokenguard.decode(jwt, globalvar.ssh['key']['public']) session_id = payload["session"]["id"] self.cursor.execute("BEGIN;")