diff options
author | Ib Lundgren <ib.lundgren@gmail.com> | 2012-12-16 22:26:58 +0100 |
---|---|---|
committer | Ib Lundgren <ib.lundgren@gmail.com> | 2012-12-16 22:26:58 +0100 |
commit | eee4b60db33d3965156c704f04e4a4316bb5a3c3 (patch) | |
tree | 4cd811f8cdaa1ecda617ef52e33e6d6a20bea45b /oauthlib/oauth1/rfc5849/__init__.py | |
parent | 8a5c7d2745dccf465e843b0330fcecfd1a23fec1 (diff) | |
download | oauthlib-eee4b60db33d3965156c704f04e4a4316bb5a3c3.tar.gz |
Incremental updates to providers
Diffstat (limited to 'oauthlib/oauth1/rfc5849/__init__.py')
-rw-r--r-- | oauthlib/oauth1/rfc5849/__init__.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/oauthlib/oauth1/rfc5849/__init__.py b/oauthlib/oauth1/rfc5849/__init__.py index 9edf4a2..f3dcd22 100644 --- a/oauthlib/oauth1/rfc5849/__init__.py +++ b/oauthlib/oauth1/rfc5849/__init__.py @@ -648,6 +648,27 @@ class Server(object): """ raise NotImplementedError("Subclasses must implement this function.") + def verify_request_token_request(self, uri, http_method='GET', body=None, + headers=None): + """Verify the initial request in the OAuth workflow. + + During this step the client obtains a request token for use during + resource owner authorization (which is outside the scope of oauthlib). + """ + return self.verify_request(uri, http_method=http_method, body=body, + headers=headers, require_resource_owner=False, + require_realm=True) + + def verify_access_token_request(self, uri, http_method='GET', body=None, + headers=None): + """Verify the second request in the OAuth workflow. + + During this step the client obtains the access token for use when + accessing protected resources. + """ + return self.verify_request(uri, http_method=http_method, body=body, + headers=headers, require_verifier=True) + def verify_request(self, uri, http_method='GET', body=None, headers=None, require_resource_owner=True, require_verifier=False, require_realm=False, required_realm=None): |