Skip to content

Commit

Permalink
Don't differentiate between invalid and not existing Signature/Creden…
Browse files Browse the repository at this point in the history
…tial ID

See #12
  • Loading branch information
Qup42 committed Apr 29, 2022
1 parent 10411fd commit 810c873
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions aletheia/auth_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def authenticate(self, request, credential_id: str, data: str = None):

credential = AuthData.objects.filter(credential_id=credential_id).first()
if not credential:
messages.error(request, f"This credential_id is not registered.", fail_silently=True)
messages.error(request, f"Authentication failed", fail_silently=True)
return None

try:
Expand All @@ -49,7 +49,6 @@ def authenticate(self, request, credential_id: str, data: str = None):
credential_public_key=base64decode(credential.public_key)
)
except InvalidAuthenticationResponse:
# TODO: give concrete feedback about why the authentication failed?
messages.error(request, f"Authentication failed", fail_silently=True)
return None

Expand Down

0 comments on commit 810c873

Please sign in to comment.