I am trying to embed a service security service in spring boot services using spring oauth2. I want the service to access the protected resource of another service without any user involvement.
There are many examples for the type of authorization code resolution, but not very many for the type of client credential that seems to be the right one for this use case.
I can configure the auth server and use the curl request to get the token. The tests I found used Http Objects to check for status codes.
How can I use the client credential type in a java client using RestTemplate and spring oauth2?
I would think that this should be as simple as adding a dependency, annotation, and configuration file, but I can't get it to work.
source share