From 013130e064f734341c63f6935290470f8fd05c87 Mon Sep 17 00:00:00 2001 From: Drew Short Date: Thu, 26 Jul 2018 14:23:14 -0500 Subject: [PATCH] Fix returned exception for invalid token --- server/atheneum/middleware/authentication_middleware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/atheneum/middleware/authentication_middleware.py b/server/atheneum/middleware/authentication_middleware.py index 43f3ee4..615da90 100644 --- a/server/atheneum/middleware/authentication_middleware.py +++ b/server/atheneum/middleware/authentication_middleware.py @@ -146,7 +146,7 @@ def require_token_auth(func: Callable) -> Callable: request.headers.get('Authorization', None)) if token and authenticate_with_token(token.username, token.password): return func(*args, **kwargs) - return authentication_failed('Bearer') + return authentication_failed('Token') return decorate