-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Implement Authorization Endpoint #66
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
Comments
@jgrandja I would like to work on this issue. Please let me know if its good to start work on this ? |
Thanks @paurav-munshi. The issue is yours. |
Can you please clarify few things ?
|
The default security configuration (
Yes, that is correct. Take a look at how
Yes, great observation! This will come in a later story. We will need to expire |
I have created a new pull request #76 for this issue. I request you to review it. I have not yet added the tests, but I think once you are fine with the code I will add javadoc and tests. Also there are a few assumptions and pointers on which I wish to have your inputs :- Assumptions
Not covered as they might make PR bigger
I think we should either cover the missing validations from spec in this PR or create a new issue for the same. Thanks, |
@paurav-munshi I took a look at the PR and it's missing some key pieces of functionality required for this issue.
The The I also noticed the use of
Spring Security
This request path should be the first check on whether this Filter will handle the request or not. Before I do a detailed review, please add tests against the |
In my PR I have included some basic client id and redirect uri validations. But I am not sure if I have to include the client_id / scope / redirect_uri etc validations in this issue. There is confusion primarily because we do not have an issue for Resource Owner Authentication. As per spec in section 4.1.1 Authorization Request
the request validation needs to happen before resource owner authentication. That means this issue will not be doing a bulk of validations. Can you please suggest what should be done with validations ? If we can identify which validation will be done a) before authentication b) before seeking user's permission c) before providing authorization code then it would be better. As per spec it seems only validation at this point in flow would be to check if resource owner gave the authorization consent or not. Thanks, |
The only validation required is what's specified in 4.1.1. Authorization Request. To clarify this statement:
The statement
|
@paurav-munshi @jgrandja I found when explaining the OAuth 2.0 Authorization Code flow that reviewing Section 4.1.2.1. Error Response and the description of the various possible error responses helped me understand what validation requirements must be met, prior to obtaining the resource owner's authentication and authorization decision. The resource owner authentication and decision process are altered if the Authorization Code validation fails:
|
I have incorporated the changes suggested by you and also added the test cases for the filter class. Please note that I have closed earlier PR #76 and opened a new PR #77 . So I request you to please review the new PR and ignore the old one. Sorry for the inconvenience if any. I have applied following validations in the Filter :-
|
An authorization server provides an authorization endpoint, which it uses when interacting with the resource owner to obtain authorization for a client.
The
OAuth2AuthorizationEndpointFilter
should be implemented as aFilter
. TheOAuth2AuthorizationRequestRedirectFilter
in thespring-security-oauth2-client
module is the clientFilter
that redirects to the Authorization Endpoint.Implementation Requirements
Filter
should process requests for the (default) path/oauth2/authorize
authorizationRequestConverter
should convert a valid Authorization Request toOAuth2AuthorizationRequest
RegisteredClientRepository
Implement Client Registration Model / Repository #40 should be used to validate theclient_id
parameterOAuth2AuthorizationService
Implement Authorization Model / Service #43 should be used to persist the in-flightOAuth2Authorization
codeGenerator
should be used to generate the authorizationcode
parameter and it should also be stored inOAuth2Authorization.attributes
for later validation in Implement Token Endpoint #67class
andpublic
methodsSpecification References
3.1. Authorization Endpoint
4.1. Authorization Code Grant
4.1.1. Authorization Request
4.1.2. Authorization Response
The text was updated successfully, but these errors were encountered: