Skip to content

#6 Add OAuth revoke (DELETE /api/token)#13

Open
nstillman-te wants to merge 1 commit into
masterfrom
feature/chess-149-oauth-revoke-token-#6
Open

#6 Add OAuth revoke (DELETE /api/token)#13
nstillman-te wants to merge 1 commit into
masterfrom
feature/chess-149-oauth-revoke-token-#6

Conversation

@nstillman-te
Copy link
Copy Markdown

Part of #6.

Adds client.oauth.revoke() to revoke the access token (DELETE /api/token). The session must be authenticated with the token to revoke (e.g. TokenSession(access_token)). Returns 204 No Content; no response body. Requests-mock test verifies DELETE is sent with Authorization Bearer.

Checklist when adding a new endpoint
  • Added new endpoint to the README.rst
  • Ensured that my endpoint name does not repeat the name of the client. Wrong: client.users.get_user(), Correct: client.users.get()
  • Typed the returned JSON using TypedDicts in berserk/types/ — N/A (204 No Content, no body)
  • Written tests (requests-mock for DELETE and Bearer header)
  • Added the endpoint to CHANGELOG.rst in the To be released section

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant