0

I have a Resource Server with resources / secured API endpoints that my service needs to send requests to. To do that I need an OAuth Token from an Authorization server that's gives token on Client Credentials kind of authentication when doing a GET on oauth/token/generate endpoint.

Spring-security-oauth2 client credentials implementation does a POST request to security.oauth2.client.access-token-uri: http://api.abc.com/oauth/token/generate by default.

How do I change the current implementation from doing a POST request to a GET request to an Authorization server on Client Credentials authentication and token request flow?

OchiengOlanga
  • 135
  • 1
  • 3
  • 11

1 Answers1

0

I figured out how to get it working. I had to create a custom Client Credentials AccessToken Provider that extended the default ClientCredentialsAccessTokenProvider.class provided by spring-security-oauth2 and @Override the default set HTTPMethod from POST to GET. Anyone got a better way of doing this? Perhaps.

OchiengOlanga
  • 135
  • 1
  • 3
  • 11