- Notifications
You must be signed in to change notification settings - Fork 1.4k
Add client_credentials grant type support #88
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
Conversation
| Hey @jgrandja, I still have a couple of to-dos:
With that in mind, feel free to provide any initial feedback you have. |
jgrandja left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @alek-sys. Please see review comments.
In addition to the feedback, please revert all changes in the samples/* as we can update the existing samples after we get this merged.
...auth2/server/authorization/authentication/OAuth2ClientCredentialsAuthenticationProvider.java Show resolved Hide resolved
...rc/main/java/org/springframework/security/oauth2/server/authorization/token/TokenIssuer.java Outdated Show resolved Hide resolved
...auth2/server/authorization/authentication/OAuth2ClientCredentialsAuthenticationProvider.java Outdated Show resolved Hide resolved
.../org/springframework/security/oauth2/server/authorization/web/OAuth2TokenEndpointFilter.java Show resolved Hide resolved
...ework/security/oauth2/server/authorization/web/AuthorizationCodeAuthenticationConverter.java Outdated Show resolved Hide resolved
...ework/security/oauth2/server/authorization/web/ClientCredentialsAuthenticationConverter.java Outdated Show resolved Hide resolved
...ework/security/oauth2/server/authorization/web/ClientCredentialsAuthenticationConverter.java Outdated Show resolved Hide resolved
| Regarding
This is already implemented in |
| Thanks for feedback @jgrandja! I'm now re-working this PR based on your comments. |
acb8bea to 0fa4376 Compare | Updated based on your comments. Also, the spec states:
But currently Token Endpoint always returns |
jgrandja left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates @alek-sys. Please see review comments.
.../org/springframework/security/oauth2/server/authorization/web/OAuth2TokenEndpointFilter.java Outdated Show resolved Hide resolved
.../org/springframework/security/oauth2/server/authorization/web/OAuth2TokenEndpointFilter.java Outdated Show resolved Hide resolved
.../org/springframework/security/oauth2/server/authorization/web/OAuth2TokenEndpointFilter.java Outdated Show resolved Hide resolved
.../org/springframework/security/oauth2/server/authorization/web/OAuth2TokenEndpointFilter.java Outdated Show resolved Hide resolved
.../org/springframework/security/oauth2/server/authorization/web/OAuth2TokenEndpointFilter.java Outdated Show resolved Hide resolved
...ework/security/oauth2/server/authorization/web/DelegateGrantTypeAuthenticationConverter.java Outdated Show resolved Hide resolved
...ework/security/oauth2/server/authorization/web/DelegateGrantTypeAuthenticationConverter.java Outdated Show resolved Hide resolved
...ework/security/oauth2/server/authorization/web/DelegateGrantTypeAuthenticationConverter.java Outdated Show resolved Hide resolved
...auth2/server/authorization/authentication/OAuth2ClientCredentialsAuthenticationProvider.java Outdated Show resolved Hide resolved
...y/oauth2/server/authorization/authentication/OAuth2ClientCredentialsAuthenticationToken.java Outdated Show resolved Hide resolved
| Thanks @jgrandja, I've updated this PR. Now there is much better split between converted and provider. |
| Great thanks @alek-sys. I will review this tomorrow. |
| @jgrandja updated based on your latest comments. Also, see my comment regarding |
| @alek-sys Can you please update the test methods to following the naming convention methodNameWhenConditionThenResult. Take a look at Also, please add integration tests in |
359ebd2 to 23ffd28 Compare | @jgrandja done. Actually there was |
jgrandja left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates @alek-sys! After the next update we should be ready to merge.
FYI, I'm out on PTO next Mon-Wed and back Thursday so no rush for the updates.
Thanks.
...ity/oauth2/server/authorization/web/DelegatingAuthorizationGrantAuthenticationConverter.java Show resolved Hide resolved
...ity/oauth2/server/authorization/web/DelegatingAuthorizationGrantAuthenticationConverter.java Outdated Show resolved Hide resolved
...y/oauth2/server/authorization/authentication/OAuth2ClientCredentialsAuthenticationToken.java Show resolved Hide resolved
...y/oauth2/server/authorization/authentication/OAuth2ClientCredentialsAuthenticationToken.java Show resolved Hide resolved
...y/oauth2/server/authorization/authentication/OAuth2ClientCredentialsAuthenticationToken.java Outdated Show resolved Hide resolved
...2/server/authorization/authentication/OAuth2ClientCredentialsAuthenticationProviderTest.java Outdated Show resolved Hide resolved
...ingframework/security/oauth2/server/authorization/web/OAuth2ClientCredentialsGrantTests.java Show resolved Hide resolved
...ingframework/security/oauth2/server/authorization/web/OAuth2ClientCredentialsGrantTests.java Outdated Show resolved Hide resolved
...ingframework/security/oauth2/server/authorization/web/OAuth2ClientCredentialsGrantTests.java Outdated Show resolved Hide resolved
...ingframework/security/oauth2/server/authorization/web/OAuth2ClientCredentialsGrantTests.java Outdated Show resolved Hide resolved
| All updated based on your review @jgrandja. I only didn't add |
| Thanks for adding this feature @alek-sys ! FYI, I followed up with a polish commit as some changes were needed and I wanted to get this merged. |
Fixes gh-51