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

Rename ContextAwareTokenCredential to OidcTokenCredential and move it out of the runtime package #11789

Conversation

sberyozkin
Copy link
Member

Fixes #10907.

There have been a few queries to do with accessing RoutingContext in the custom SecurityIdentityAugmentor.

Pedro @pedroigor has already provided a useful ContextAwareTokenCredential for the internal (runtime) OIDC purposes.
So I've only moved this class to out of the runtime package to make it part of the API, and also renamed it to OidcTokenCredential (we may add more properties into it which will be common to both OIDC ID and AccessToken credentials) and renamed getContextto getRoutIngContext and made it public.

Stuart, Pedro's original solution looks simple enough for me at the moment and should work, but you may have a better idea how to pass the routing context around, have a look please :-)

@sberyozkin sberyozkin added this to the 1.8.0 - master milestone Sep 1, 2020
@gsmet gsmet removed this from the 1.8.0.CR1 milestone Sep 2, 2020
@sberyozkin
Copy link
Member Author

I've checked if injecting RoutingContext instead would work, but it does not in the test CustomSecurityIdentityAugmentor due to the injection scope not being active, so I suppose something like to what is done in the PR is ok...

@sberyozkin sberyozkin force-pushed the sec_augmentor_token_cred_improvements branch from 07e45fe to fbe75f1 Compare September 8, 2020 11:56
@sberyozkin
Copy link
Member Author

@pedroigor thanks, will wait for the builds to finish

@sberyozkin sberyozkin added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Sep 8, 2020
@sberyozkin sberyozkin added this to the 1.9.0 - master milestone Sep 8, 2020
@sberyozkin sberyozkin merged commit 113195c into quarkusio:master Sep 8, 2020
@sberyozkin sberyozkin deleted the sec_augmentor_token_cred_improvements branch September 8, 2020 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/oidc triage/waiting-for-ci Ready to merge when CI successfully finishes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make RoutingContext available in SecurityIdentityAugmentor
3 participants