This recipe will help you create a client application using the Client Credentials grant type. The project shown in this recipe retrieves the user's profile from the running OAuth provider available. Unlike the other grant types, when using Client Credentials the application will access OAuth's protected resources on its own behalf, so the client application doesn't need any user's approval.
To run this recipe, make sure you have an OAuth 2.0 Provider running on your machine. I recommend you to use the project client-credentials-server
presented in Chapter 2, Implementing Your Own OAuth 2.0 Provider. If you have any doubt about the source code presented in this recipe, do not hesitate to download the source code available on GitHub at https://github.com/PacktPublishing/OAuth-2.0-Cookbook/tree/master/Chapter02/client-credentials-server. Besides having an OAuth 2.0 Provider running, you will need Java 8, Maven...