oauth2-rest-client Sample OAuth2 secured REST client Setup You have to define the following environment variables: TOKEN_URI CLIENT_ID CLIENT_SECRET Run with the following command: mvn spring-boot:run