summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Marillonnet <pmarillonnet@entrouvert.com>2020-10-22 10:21:08 (GMT)
committerPaul Marillonnet <pmarillonnet@entrouvert.com>2020-10-22 10:21:08 (GMT)
commit93b87ca1b7d270f84831336f2354ffc7aba3bc5c (patch)
tree4c969850d871938e7fba75c496c8f13c46dce882
parent45a93bb27330c206db6e5b1d4d34049b82b37456 (diff)
downloadauthentic-wip/47900-idp-oidc-client-authn-failure.zip
authentic-wip/47900-idp-oidc-client-authn-failure.tar.gz
authentic-wip/47900-idp-oidc-client-authn-failure.tar.bz2
idp_oidc: correct error responses (#47900)wip/47900-idp-oidc-client-authn-failure
-rw-r--r--src/authentic2_idp_oidc/views.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/authentic2_idp_oidc/views.py b/src/authentic2_idp_oidc/views.py
index 4253a59..46e9b9e 100644
--- a/src/authentic2_idp_oidc/views.py
+++ b/src/authentic2_idp_oidc/views.py
@@ -553,7 +553,7 @@ def tokens_from_authz_code(request):
return invalid_request_response('code has expired or user is disconnected')
client = authenticate_client(request, client=oidc_code.client)
if client is None:
- return HttpResponse('unauthenticated', status=401)
+ return HttpResponse('invalid_client', status=401)
# delete immediately
models.OIDCCode.objects.filter(uuid=code).delete()
redirect_uri = request.POST.get('redirect_uri')
@@ -635,7 +635,7 @@ def authenticate_access_token(request):
def user_info(request, *args, **kwargs):
access_token = authenticate_access_token(request)
if access_token is None:
- return HttpResponse('unauthenticated', status=401)
+ return HttpResponse('invalid_token', status=401)
user_info = utils.create_user_info(request,
access_token.client,
access_token.user,