examples: Add an example oauth-enabled client #595
+633
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Despite the PR guidelines asking for a single commit, I thought it would be easier to split the PR into several - I can rework the PR if there's general interest in accepting this work.
The motivation for creating an example client was both a user asking on Discord as well as me exploring a proposed client credentials flow extension and finally it seems that the upcoming SDK tier proposals put an emphasis on docs with examples.
For now, there is no example server, that would make the PR much more complex before I'm even sure upstream is interested, but I did test with the example server and AS from the Python SDK.
Provided you have a checkout of the Python SDK available, you'd do:
And then run the client as:
I'd be happy to work on the PR further or split it if having a full OAuth example test is of interest to the SDK maintainers.