-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Description
Summary
spring-security-oauth2-client uses a RestTemplate for openid/oauth Discovery that is not configurable. This is unuseable in scenarios where you need to adjust the RestTemplate. Example: You need to use a proxy and configure auth.
Actual Behavior
ClientRegistrations class uses a RestTemplate for doing OpenId Discovery that is not configurable, since it is not using RestTemplateBuilder or something comparable.
OpenId discovery is done by querying issuerUri + "/.well-known/openid-configuration" (for oidc) or isserUri + "/.well-known/oauth-authorization-server" (for oauth).
Current implementation:
RestTemplate rest = new RestTemplate()
Expected Behavior
ClientRegistrations should use a configurable RestTemplate for doing OpenId Discovery. One should be able to configure the requestFactory, interceptors, errorHandler and so on of that RestTemplate.
Configuration
Version
5.2.0.M3 and 5.1.5.RELEASE
Sample
Line 58 in 1739ef8
private static final RestTemplate rest = new RestTemplate(); |
Related #5607