- Simple microservice which is also a resource server.
- Needs to be used in combination with OAuth server https://github.com/ykarthickeyan/oauth-server
- Spin up the outh server first and change the properties as per the environment.
- Use Outh2 server to generate token first in the steps mentioned below
- Use the JWT token to extract the access token and pass it as a bearer token in the Authorization header to order service APIs
- MySql needs to be also setup and running before started this microservice.
- @EnableMethod security needs to be provided in the configuration so that we can preauthorize with authorities. Default scope provide is openid and in 'hasAuthorities' must we prefixed with SCOPE_
GET: Generate the authorization code Use https://developer.pingidentity.com/en/tools/pkce-code-generator.html to generate the code challenge
POST : Use the code from the above response in the next call. And code_verifier for the above challange