Revoke the specified token.
(oauth_token)
| 184 | |
| 185 | |
| 186 | def revoke_token(oauth_token): |
| 187 | """Revoke the specified token.""" |
| 188 | _params = build_auth_dict(oauth_token) |
| 189 | _auth = (_params['client_id'], _params['client_secret']) |
| 190 | url = TOKEN_URL.format(**_params) |
| 191 | response = requests.delete(url, auth=_auth, headers=HEADERS) |
| 192 | if response.status_code == 204: |
| 193 | return True |
| 194 | return False |
| 195 | |
| 196 | |
| 197 | def reset_token(oauth_token): |