summaryrefslogtreecommitdiff
path: root/oauthlib/oauth2
diff options
context:
space:
mode:
authorAndrei Fokau <andrei@5monkeys.se>2013-02-06 12:39:05 +0100
committerAndrei Fokau <andrei@5monkeys.se>2013-02-06 12:39:05 +0100
commitc287c87a102b95d4636b5ea3ebac2d1332513dfd (patch)
treeaf11398f618b30a8b7b11cb4495184786f736517 /oauthlib/oauth2
parent8ab03a2fb7c5c1f081f38788b300d7fe72f45073 (diff)
downloadoauthlib-c287c87a102b95d4636b5ea3ebac2d1332513dfd.tar.gz
Fixed typos in grant_types. Initialized attributes to avoid validation errors.
Diffstat (limited to 'oauthlib/oauth2')
-rw-r--r--oauthlib/oauth2/draft25/grant_types.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/oauthlib/oauth2/draft25/grant_types.py b/oauthlib/oauth2/draft25/grant_types.py
index 2de038c..516a183 100644
--- a/oauthlib/oauth2/draft25/grant_types.py
+++ b/oauthlib/oauth2/draft25/grant_types.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
"""
oauthlib.oauth2.draft_25.grant_types
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -320,6 +321,8 @@ class RequestValidator(object):
class GrantTypeBase(object):
+ error_uri = None
+ request_validator = None
def create_authorization_response(self, request, token_handler):
raise NotImplementedError('Subclasses must implement this method.')
@@ -440,7 +443,7 @@ class AuthorizationCodeGrant(GrantTypeBase):
# OPTIONAL. As described in Section 3.1.2.
# http://tools.ietf.org/html/rfc6749#section-3.1.2
- log.debug('Validating redirction uri %s for client %s.',
+ log.debug('Validating redirection uri %s for client %s.',
request.redirect_uri, request.client_id)
if request.redirect_uri is not None:
request.using_default_redirect_uri = False
@@ -476,7 +479,7 @@ class AuthorizationCodeGrant(GrantTypeBase):
if not self.request_validator.validate_response_type(request.client_id,
request.response_type, request):
- log.debug('Client %s is not authorized to use resposne_type %s.',
+ log.debug('Client %s is not authorized to use response_type %s.',
request.client_id, request.response_type)
raise errors.UnauthorizedClientError()
@@ -958,7 +961,7 @@ class ClientCredentialsGrant(GrantTypeBase):
def validate_token_request(self, request):
if not getattr(request, 'grant_type'):
- raise errors.InvalidRequestError('Request is issing grant type.')
+ raise errors.InvalidRequestError('Request is missing grant type.')
if not request.grant_type == 'client_credentials':
raise errors.UnsupportedGrantTypeError()