Method for fetching an access token from the token endpoint. This is the final step in the OAuth 1 workflow. An access token is obtained using all previously obtained credentials, including the verifier from the authorization step. :param url: Access Token endpoint.
(self, url, verifier=None, **kwargs)
| 116 | return self._fetch_token(url, **kwargs) |
| 117 | |
| 118 | def fetch_access_token(self, url, verifier=None, **kwargs): |
| 119 | """Method for fetching an access token from the token endpoint. |
| 120 | |
| 121 | This is the final step in the OAuth 1 workflow. An access token is |
| 122 | obtained using all previously obtained credentials, including the |
| 123 | verifier from the authorization step. |
| 124 | |
| 125 | :param url: Access Token endpoint. |
| 126 | :param verifier: A verifier string to prove authorization was granted. |
| 127 | :param kwargs: Extra parameters to include for fetching access token. |
| 128 | :return: A token dict. |
| 129 | """ |
| 130 | if verifier: |
| 131 | self.auth.verifier = verifier |
| 132 | if not self.auth.verifier: |
| 133 | self.handle_error("missing_verifier", 'Missing "verifier" value') |
| 134 | return self._fetch_token(url, **kwargs) |
| 135 | |
| 136 | def parse_authorization_response(self, url): |
| 137 | """Extract parameters from the post authorization redirect |