An example available in https://borosr-spring-boot-app.herokuapp.com/
./mvnw spring-boot:run
curl -X POST http://localhost:8080/oauth/token \
-H 'Authorization: Basic ${btoa("clientId:secret")}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'grant_type=password&username=john&password=123'
Response looks like: { access_token: string, token_type: string, refresh_token: string, expires_in: number, scope: string, jti: string }
curl -X GET http://localhost:8080/secure/ \
-H 'Authorization: Bearer ${access_token_from_response}'
Path: /oauth/check_token
endpoint response token's data
curl -X POST http://localhost:8080/oauth/check_token \
-H 'Authorization: Basic ${btoa("clientId:secret")}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'token=${access_token_from_response}'
Path: /oauth/token/revoke/
curl -X DELETE http://localhost:8080/oauth/token/revoke/ \
-H 'Authorization: Bearer ${access_token_from_response}'
username: john
password: 123
clientId: fooClientIdPassword
secret: secret
./mvnw clean test