Open
Description
Expected Behavior
DefaultOAuth2UserService
can be extended to e.g. allow for custom body parsing to handle application/jwt
for signed and/or encrypted UserInfo Response.
Rough draft:
public class CustomOAuth2UserService extends DefaultOAuth2UserService {
@Override
protected ResponseEntity<Map<String, Object>> getResponse(OAuth2UserRequest userRequest, RequestEntity<?> request) {
// Custom code to handle requests that aren't simple application/json
return ...;
}
}
We are open for other solutions as well and happy to contribute, if that's something you see worth it as addition to spring-security.
Current Behavior
DefaultOAuth2UserService
has to be copied and "rewritten" - because getResponse()
is called inside loadUser(OAuth2UserRequest userRequest)
which forces us to re-create the whole loadUser(OAuth2UserRequest userRequest)
method.
Context
Related to #9583