MCPcopy
hub / github.com/gitcoinco/web / revoke_token

Function revoke_token

app/git/utils.py:186–194  ·  view source on GitHub ↗

Revoke the specified token.

(oauth_token)

Source from the content-addressed store, hash-verified

184
185
186def 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
197def reset_token(oauth_token):

Callers 1

test_revoke_tokenMethod · 0.90

Calls 2

build_auth_dictFunction · 0.85
deleteMethod · 0.80

Tested by 1

test_revoke_tokenMethod · 0.72