-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Added token endpoint implementation #79
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
|
@jgrandja Have added the initial changes for early feedback. Tests, javadoc to follow. Also need your help to understand the required failure scenarios to be handled here so that I don't add unnecessary checks and failure handling. |
|
@kratostaine Please review 4.1.3. Access Token Request to understand all the validations that need to be applied. At minimum, you will need to validate the REQUIRED parameters. However, some of the parameter values will be validated by the If you are still unsure on what to validate, please send me the reference in the spec and I could let you know if it should be performed in |
@jgrandja the above 4 are the reqd parameters as per the spec. I have done a validation on |
Yes for
The |
1c0bd69 to
871b37f
Compare
|
Tests to follow. @jgrandja Please review this so that if there are any changes required, I won't have to rework on the tests. |
|
@jgrandja Also regarding |
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 @kratostaine. Please see review comments.
Also, please add tests before next review. I typically do not review until tests are written. Writing tests should demonstrate if the implementation is correct or if gaps are missing.
...k/security/oauth2/server/authorization/authentication/OAuth2ClientAuthenticationManager.java
Outdated
Show resolved
Hide resolved
...uth2/server/authorization/converter/OAuth2AuthorizationCodeAuthenticationTokenConverter.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
...uth2/server/authorization/converter/OAuth2AuthorizationCodeAuthenticationTokenConverter.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
5bafec8 to
7f5ddfc
Compare
.../main/java/org/springframework/security/oauth2/server/authorization/OAuth2Authorization.java
Outdated
Show resolved
Hide resolved
...ecurity/oauth2/server/authorization/authentication/OAuth2AccessTokenAuthenticationToken.java
Show resolved
Hide resolved
...y/oauth2/server/authorization/authentication/OAuth2AuthorizationCodeAuthenticationToken.java
Show resolved
Hide resolved
.../org/springframework/security/oauth2/server/authorization/web/OAuth2TokenEndpointFilter.java
Show resolved
Hide resolved
.../org/springframework/security/oauth2/server/authorization/web/OAuth2TokenEndpointFilter.java
Outdated
Show resolved
Hide resolved
...springframework/security/oauth2/server/authorization/web/OAuth2TokenEndpointFilterTests.java
Outdated
Show resolved
Hide resolved
3205ee1 to
058ca53
Compare
|
@jgrandja could you please help with reviewing this? |
|
Thank you for all the updates @kratostaine! Overall, the implementation looked good and complied to spec for the most part. I did add a polish commit in order to get this merged, as I'm hoping to complete the first iteration of Please take a look at the changes applied in the polish commit and let me know if you have any questions. Thank you again and I look forward to another contribution 👍 |
Fixes #67
Implementation Requirements
/oauth2/tokenauthorizationGrantConvertershould convert a validauthorization_codeAccess Token Request toOAuth2AuthorizationCodeAuthenticationTokenOAuth2AuthorizationCodeAuthenticationTokenshould be passed to theAuthenticationManagerAuthenticationManagershould be composed ofOAuth2AuthorizationCodeAuthenticationProviderOAuth2AccessTokenAuthenticationTokenshould be returned fromAuthenticationManagerOAuth2AccessTokenshould be updated in the in-flightOAuth2Authorization