I have a problem finding an example for an OAuth2 client implemented using Spring.
I have OAuth2 authorization and a resource server implemented using Spring. I want to get an access token from this authorization server. I need an example how to get the access token from my OAuth2 server using only client credentials. No user is involved in this, only my client application receives an access token using client credentials, and then uses it to access client resources .
I found only an example of using Java libraries, but I assume that there is support for this in the Spring OAuth2 environment.
If possible, the example should include an OAuth2 client, an OAuth2 authorization server, and an OAuth2 resource server, all of which communicate via TLS using a self-signed certificate implemented using Spring, without an xml configuration.
Here is the sequence diagram:

source
share