Skip to content

#6 Add OAuth authorization_url#11

Open
nstillman-te wants to merge 2 commits intomasterfrom
feature/chess-121-oauth-authorization-url-#6
Open

#6 Add OAuth authorization_url#11
nstillman-te wants to merge 2 commits intomasterfrom
feature/chess-121-oauth-authorization-url-#6

Conversation

@nstillman-te
Copy link
Copy Markdown

Part of #6.

Adds client.oauth.authorization_url() to build the OAuth2 authorization URL (GET /oauth) for the Authorization Code flow with PKCE. Callers redirect the user to the returned URL; no HTTP request is made by the client. Optional params: state, scope, username. Unit tests assert the built URL contains the correct query params (no requests-mock: method does not perform a request).

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 (endpoint returns a URL string, no JSON)
  • Written tests for the endpoint (unit tests for URL construction; no VCR — method does not perform a request)
  • 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