From fb4e9bd8fe53c90040c9fe15a26454cc19e05763 Mon Sep 17 00:00:00 2001 From: juanifioren Date: Thu, 18 Feb 2016 16:03:46 -0300 Subject: [PATCH] Fix openid scope in authorize view. --- oidc_provider/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/oidc_provider/views.py b/oidc_provider/views.py index f429ecd..01f5d1b 100644 --- a/oidc_provider/views.py +++ b/oidc_provider/views.py @@ -57,7 +57,8 @@ class AuthorizeView(View): # Remove `openid` from scope list # since we don't need to print it. - authorize.params.scope.remove('openid') + if 'openid' in authorize.params.scope: + authorize.params.scope.remove('openid') context = { 'client': authorize.client, @@ -117,7 +118,7 @@ class AuthorizeView(View): class TokenView(View): def post(self, request, *args, **kwargs): - + token = TokenEndpoint(request) try: