Skip to content

Commit

Permalink
Remove more duplicated code
Browse files Browse the repository at this point in the history
  • Loading branch information
C. Weaver committed Feb 10, 2024
1 parent f6ef426 commit d72e0aa
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions scimma_admin/hopskotch_auth/api_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d72e0aa

Please sign in to comment.