-
Notifications
You must be signed in to change notification settings - Fork 6k
Make user info response status check error only #9336
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
This would otherwise fail on anything in the 2xx range thats not 200 OK. For example when i use the user-info-uri: https://vl.api.np.km.playstation.net/vl/api/v1/mobile/users/me/info it returns 201 Created (dont ask me why Sony chose that). Anyway i think this status check will still cover most cases by checking if its a 2xx status. Also this just works in the non reactive version: org.springframework.security.oauth2.client.userinfo.DefaultOAuth2UserService because it try catches the request.
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.
@BenjaminFaal I don't feel we can accept this PR based on a non-compliant provider. Have you reported this to Sony?
...va/org/springframework/security/oauth2/client/userinfo/DefaultReactiveOAuth2UserService.java
Outdated
Show resolved
Hide resolved
Hmm thats a valid point i always thought 2xx was considered success. You are right that Sony should fix this but the nonreactive version: org.springframework.security.oauth2.client.userinfo.DefaultOAuth2UserService just works because it only try-catches the RestClientException and UnknownContentTypeException exceptions which a 201 does not cause. |
Thanks for the PR @BenjaminFaal ! This is now in master and I'll have this backported as well. |
This would otherwise fail on anything in the 2xx range thats not 200 OK. For example when i use the user-info-uri: https://vl.api.np.km.playstation.net/vl/api/v1/mobile/users/me/info it returns 201 Created (dont ask me why Sony chose that). Anyway i think this status check will still cover most cases by checking if its a 2xx status.
Also this just works in the non reactive version: org.springframework.security.oauth2.client.userinfo.DefaultOAuth2UserService because it try catches the request.