You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that when the plugin is configured to use APPROVAL_STORE, the authorization code grant flow will always redirect with http://localhost:5555/sample-oauth2-app?error=access_denied&error_description=User%20denied%20access. Even though, a record will be created in the Approval table. In addition, subsequent call will return success with the authorization code.
I managed to trace (to what I believe is the cause) to the method updateAfterApproval in org.springframework.security.oauth2.provider.approval.ApprovalStoreUserApprovalHandler
In the logs, I had printed out value which is null, even though the user_oauth_approval is true. In this case, I wonder if the plugin is sending approvalParameters that is acceptable by org.springframework.security.oauth2.provider.approval.ApprovalStoreUserApprovalHandler
Logs
19 Aug 2016 13:51:11,380 DEBUG ApprovalStoreUserApprovalHandler:128 - |updateAfterApproval|BEG|
19 Aug 2016 13:51:11,381 DEBUG ApprovalStoreUserApprovalHandler:128 - |updateAfterApproval|approvalParameters|{authorize=, user_oauth_approval=true, scope=read, response_type=code, client_id=my-client}
19 Aug 2016 13:51:11,382 DEBUG ApprovalStoreUserApprovalHandler:128 - |updateAfterApproval|approvalParameter|scope.read
19 Aug 2016 13:51:11,382 DEBUG ApprovalStoreUserApprovalHandler:128 - |updateAfterApproval|value|null
19 Aug 2016 13:51:11,384 DEBUG ApprovalStoreUserApprovalHandler:128 - |updateAfterApproval|ApprovalStatus.DENIED|
|addApprovals|gormApproval NOT exist|
|isApproved|true
19 Aug 2016 13:51:11,546 DEBUG ApprovalStoreUserApprovalHandler:128 - |isApproved|
Log for subsequent call
|createAuthorizationRequest|org.springframework.security.oauth2.provider.AuthorizationRequest@b83b276c
19 Aug 2016 13:53:53,316 DEBUG ApprovalStoreUserApprovalHandler:128 - Looking up user approved authorizations for client_id=my-client and [email protected]
19 Aug 2016 13:53:53,325 DEBUG ApprovalStoreUserApprovalHandler:128 - Valid user approved/denied scopes are [read]
19 Aug 2016 13:53:53,326 DEBUG ApprovalStoreUserApprovalHandler:128 - |isApproved|
(Migrated from bluesliverx/grails-spring-security-oauth2-provider#124 reported by @xstdio)
To start off I am using the following:
I noticed that when the plugin is configured to use
APPROVAL_STORE
, the authorization code grant flow will always redirect withhttp://localhost:5555/sample-oauth2-app?error=access_denied&error_description=User%20denied%20access
. Even though, a record will be created in theApproval
table. In addition, subsequent call will return success with the authorization code.I managed to trace (to what I believe is the cause) to the method
updateAfterApproval
inorg.springframework.security.oauth2.provider.approval.ApprovalStoreUserApprovalHandler
In the logs, I had printed out
value
which is null, even though theuser_oauth_approval
istrue
. In this case, I wonder if the plugin is sendingapprovalParameters
that is acceptable byorg.springframework.security.oauth2.provider.approval.ApprovalStoreUserApprovalHandler
Logs
Log for subsequent call
In
config.groovy
The text was updated successfully, but these errors were encountered: