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

Allow specify header in ServerBearerTokenAuthenticationConverter #8337

Closed
TJReinert opened this issue Apr 6, 2020 · 2 comments
Closed

Allow specify header in ServerBearerTokenAuthenticationConverter #8337

TJReinert opened this issue Apr 6, 2020 · 2 comments
Assignees
Labels
in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) type: enhancement A general enhancement
Milestone

Comments

@TJReinert
Copy link
Contributor

TJReinert commented Apr 6, 2020

Summary

I'd like to be able to use the current ServerBearerTokenAuthenticationConverter but want to use a different header (HttpHeaders.PROXY_AUTHORIZATION) for my Spring Cloud Gateway Instance.

Actual Behavior

Authentication must be taken from the HttpHeaders.AUTHORIZATION.

Expected Behavior

I should be able to supply what Header I would like to extract my token from. If not specified default to HttpHeaders.AUTHORIZATION.

Version

All versions, enhancement request.

Notes

These changes are straight forward and I can open a PR for these changes if deemed necessary.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 6, 2020
@jzheaux
Copy link
Contributor

jzheaux commented Apr 6, 2020

That makes sense, @TJReinert, would you be interested in submitting a PR to add that feature?

@jzheaux jzheaux added in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) status: waiting-for-feedback We need additional information before we can continue type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Apr 6, 2020
@TJReinert
Copy link
Contributor Author

Sure thing. Please coach me if there are improvements desired -- first submission to an opensource project.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Apr 6, 2020
TJReinert added a commit to TJReinert/spring-security that referenced this issue Apr 8, 2020
Added ability to specify the header that
ServerBearerTokenAuthenticationConverter and
DefaultBearerTokenResolver use to extract a Bearer Token.

Fixes spring-projectsgh-8337
@jzheaux jzheaux closed this as completed in 2f8eb16 Apr 9, 2020
jzheaux added a commit that referenced this issue Apr 9, 2020
@rwinch rwinch removed the status: feedback-provided Feedback has been provided label Apr 9, 2020
@jzheaux jzheaux added this to the 5.4.0.M1 milestone Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants