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
{{ message }}
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.
When configuring spring.oauth2.resource.jwt.keyUri, if the endpoint is unprotected (eg if the key is a public key) the application will retrieve the key. If the endpoint is protected (eg if the key is a symmetric key) the RestTemplate [1] will throw an HttpClientErrorException: 401 Unauthorized and the application will not start up.
We could catch the 401 and try again with the credentials in the ResourceServerProperties, or just use those credentials on the first request.
The client id and secret are used if available (per the default
implementation of the UAA and any Spring OAuth server).
Fixesspring-atticgh-59, fixesspring-atticgh-60.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When configuring
spring.oauth2.resource.jwt.keyUri
, if the endpoint is unprotected (eg if the key is a public key) the application will retrieve the key. If the endpoint is protected (eg if the key is a symmetric key) the RestTemplate [1] will throw an HttpClientErrorException: 401 Unauthorized and the application will not start up.We could catch the 401 and try again with the credentials in the ResourceServerProperties, or just use those credentials on the first request.
[1] https://github.com/spring-cloud/spring-cloud-security/blob/f31cb05807bf53355cb22219bc7f5d7300542aea/src/main/java/org/springframework/cloud/security/oauth2/resource/ResourceServerTokenServicesConfiguration.java#L267-L268
The text was updated successfully, but these errors were encountered: