Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OAuth 2.0 support into the example app #569

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

TheSpiritXIII
Copy link
Member

@TheSpiritXIII TheSpiritXIII commented Sep 14, 2023

Example usage:

go run ./examples/instrumentation/go-synthetic/ --oauth2-client-id=abc --oauth2-client-secret=xyz
curl "localhost:8080/token?grant_type=client_credentials&client_id=abc&client_secret=xyz"
# Fetch access token from above and use as bearer token example below:
curl -H "Authorization: Bearer DZ~9UYwD" localhost:8080/metrics

This PR builds on top of #568.

@pintohutch
Copy link
Collaborator

I'm going to let @macxamin take point on the review here and will drop myself.

@pintohutch pintohutch removed their request for review September 14, 2023 19:54
@TheSpiritXIII TheSpiritXIII force-pushed the TheSpiritXIII/synthetic-oauth2 branch from 2dc1b30 to 7fb1782 Compare September 14, 2023 20:55
@TheSpiritXIII TheSpiritXIII marked this pull request as ready for review September 14, 2023 20:55
@TheSpiritXIII TheSpiritXIII force-pushed the TheSpiritXIII/synthetic-oauth2 branch from 7fb1782 to a240c01 Compare September 15, 2023 18:07
@TheSpiritXIII TheSpiritXIII force-pushed the TheSpiritXIII/synthetic-oauth2 branch from a240c01 to f8d1b59 Compare September 19, 2023 19:41
@TheSpiritXIII TheSpiritXIII force-pushed the TheSpiritXIII/synthetic-oauth2 branch from f8d1b59 to 6a59061 Compare September 19, 2023 19:47
Copy link
Collaborator

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

client_credentials grant is bit simplistic for real use cases, but for test purposes - sure (:

LGTM, thanks!

@bwplotka bwplotka merged commit 2a05ea2 into main Sep 20, 2023
@TheSpiritXIII TheSpiritXIII deleted the TheSpiritXIII/synthetic-oauth2 branch October 6, 2023 19:12
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.

4 participants