From d72e0aa8e0e7d82e0f3a50fdc4761b20eb58eeee Mon Sep 17 00:00:00 2001 From: "C. Weaver" Date: Fri, 9 Feb 2024 23:14:26 -0500 Subject: [PATCH] Remove more duplicated code --- scimma_admin/hopskotch_auth/api_views.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/scimma_admin/hopskotch_auth/api_views.py b/scimma_admin/hopskotch_auth/api_views.py index 8e046b5..c0efd47 100644 --- a/scimma_admin/hopskotch_auth/api_views.py +++ b/scimma_admin/hopskotch_auth/api_views.py @@ -69,19 +69,6 @@ def find_current_credential(request) -> Optional[SCRAMCredentials]: return None return None -def describe_auth(request) -> str: - auth = getattr(request, "auth", None) - if auth: - if isinstance(auth, SCRAMCredentials): - return f"Authentication was HTTP SCRAM with credential {auth.username}" - if isinstance(auth, bytes): - token = RESTAuthToken.get_token(auth) - if token is not None: - return f"Authentication was with token {token}" - else: - return "Authentication was with unknown token" - return "Request was not authenticated" - class Version(APIView): # This is non-sensitive information, which a client may need to read in order to authenticate # correctly, so it is not itself subject to authentication