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

OAuth2ClientConfiguration discovers client_credentials OAuth2AccessTokenResponseClient #6572

Closed
jgrandja opened this issue Mar 1, 2019 · 6 comments
Assignees
Labels
in: config An issue in spring-security-config in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) type: enhancement A general enhancement
Milestone

Comments

@jgrandja
Copy link
Contributor

jgrandja commented Mar 1, 2019

We should allow for a @Bean of type OAuth2AccessTokenResponseClient<OAuth2ClientCredentialsGrantRequest> to be discovered by OAuth2ClientConfiguration. This would than be associated with OAuth2AuthorizedClientArgumentResolver.setClientCredentialsTokenResponseClient().

Ultimately, this will allow the user to register a DefaultClientCredentialsTokenResponseClient @Bean with a configured RestOperations and/or Converter<OAuth2ClientCredentialsGrantRequest, RequestEntity<?>>.

@jgrandja jgrandja added in: config An issue in spring-security-config type: enhancement A general enhancement status: ideal-for-contribution An issue that we actively are looking for someone to help us with in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) labels Mar 1, 2019
@jgrandja jgrandja added this to the 5.2.0.M2 milestone Mar 1, 2019
@jgrandja
Copy link
Contributor Author

jgrandja commented Mar 1, 2019

@fritzdj Thanks for taking this on! To start off, please get familiar with the Contributing guidelines.

After you setup your spring-security fork in your local dev environment, get familiar with OAuth2ClientConfiguration as this is where you will need to apply the updates. Also, take a look at OAuth2ClientConfigurationTests to see how to go about writing the test.

Let me know whenever you have any questions.
Thanks!

@clevertension
Copy link
Contributor

@fritzdj are you working on this issue? if not, i can provide a PR 😛

@fritzdj
Copy link
Contributor

fritzdj commented Mar 6, 2019

Go for it @clevertension. I should have time later this week if you don't get to it.

@clevertension
Copy link
Contributor

👍, it's yours, go ahead and nice coding

@fritzdj
Copy link
Contributor

fritzdj commented Mar 8, 2019

@jgrandja, can you please respond to my questions from https://gitter.im/spring-projects/spring-security?at=5c81cda88f294b134a0768d2 - I'm not sure which platforms works best for these types of questions.

NOTE: I think I understand the second question now -> it's not really tied to the principle for client credentials calls after testing it out. I'm still questioning how to best handle refreshing access tokens - it seems like it should be a part of the handler to get an authorized client. Please let me know your thoughts.

@jgrandja
Copy link
Contributor Author

@fritzdj

I'm not sure which platforms works best for these types of questions.

It's best to keep the questions/dialogue either in this issue or the submitted PR.

I'm still questioning how to best handle refreshing access tokens

Thanks for catching this! This needs to be implemented in a separate PR so I've logged #6609 to track it.

@jgrandja jgrandja removed the status: ideal-for-contribution An issue that we actively are looking for someone to help us with label Mar 13, 2019
@jgrandja jgrandja self-assigned this Mar 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: config An issue in spring-security-config 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

No branches or pull requests

3 participants