diff options
author | Andrei Fokau <andrei@5monkeys.se> | 2013-02-06 14:17:43 +0100 |
---|---|---|
committer | Andrei Fokau <andrei@5monkeys.se> | 2013-02-06 14:17:43 +0100 |
commit | c0f1a9ec3df123eea7c24159f02c205bf0a3f3ea (patch) | |
tree | 5ee2b67ba4df613e0a3a467c0f4bca7aa5451e89 | |
parent | d46e37f1de5b716a2f12c23635cd60b383ac20ac (diff) | |
download | oauthlib-c0f1a9ec3df123eea7c24159f02c205bf0a3f3ea.tar.gz |
Fixed typo and argument order in docs.
-rw-r--r-- | docs/server2.rst | 2 | ||||
-rw-r--r-- | oauthlib/oauth2/draft25/errors.py | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/docs/server2.rst b/docs/server2.rst index ebfe4b9..586fdee 100644 --- a/docs/server2.rst +++ b/docs/server2.rst @@ -81,7 +81,7 @@ Assuming you have the validator from above implemented already, creating an OAut validator = MyRequestValidator() server = WebApplicationServer(validator) - provider = OAuth2ProviderDecorator(server, '/error') # See view error below + provider = OAuth2ProviderDecorator('/error', server) # See view error below @login_required @provider.pre_authorization_view diff --git a/oauthlib/oauth2/draft25/errors.py b/oauthlib/oauth2/draft25/errors.py index 132da8d..a5ca4d3 100644 --- a/oauthlib/oauth2/draft25/errors.py +++ b/oauthlib/oauth2/draft25/errors.py @@ -1,3 +1,4 @@ +# coding=utf-8 """ oauthlib.oauth2.draft_25.errors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -31,6 +32,7 @@ class OAuth2Error(Exception): self.uri = uri self.state = state self.status_code = status_code + self.error = None def in_uri(self, uri): return add_params_to_uri(uri, self.twotuples) @@ -120,7 +122,7 @@ class ServerError(OAuth2Error): error = 'server_error' -class TemporarilyUnvailableError(OAuth2Error): +class TemporarilyUnavailableError(OAuth2Error): """The authorization server is currently unable to handle the request due to a temporary overloading or maintenance of the server. (This error code is needed because a 503 Service Unavailable HTTP |