Move validate_params function to views (on POST authorize).

This commit is contained in:
juanifioren 2015-06-15 17:34:36 -03:00
parent 06392c7600
commit 48fcb1da93
2 changed files with 3 additions and 3 deletions

View file

@ -82,8 +82,6 @@ class AuthorizeEndpoint(object):
def create_response_uri(self):
try:
self.validate_params()
if self.grant_type == 'authorization_code':
code = create_code(
user=self.request.user,
@ -95,7 +93,7 @@ class AuthorizeEndpoint(object):
# Create the response uri.
uri = self.params.redirect_uri + '?code={0}'.format(code.code)
else: # Implicit Flow
elif self.grant_type == 'implicit':
id_token_dic = create_id_token(
user=self.request.user,
aud=self.client.client_id)

View file

@ -73,6 +73,8 @@ class AuthorizeView(View):
allow = True if request.POST.get('allow') else False
try:
authorize.validate_params()
if not allow:
raise AuthorizeError(authorize.params.redirect_uri,
'access_denied',