Hello,
I have two spring boot 2.1.8 services running, one configured as @EnableOAuth2Client and acting as a client providing authentication and retrieving access tokens. The other setup as a resource server using Okta service.
The client yml contains:
spring:
security:
oauth2:
client:
registration:
okta:
client-id: xxxx
client-secret: xxxx
- openid
- profile
- email
provider:
okta:
authorization-uri: https://xxxx/oauth2/v1/authorize
token-uri: https://xxxx/oauth2/v1/token
user-info-uri: https://xxxx/oauth2/v1/userinfo
user-name-attribute: sub
jwk-set-uri: https://xxx/oauth2/v1/keys
I am using RestTemplate from the client to consume an external API. The relevant code looks like:
Any suggestions about why this is happening please?
Regards and Thanks