How to validate access_token(Azure AD OAuth 2.0) in web API?

Viewed 7378

I am using Azure AD OAuth 2.0 authorization flow for my Spring Boot Microservices + Angular2 application.
Flow of my application

  1. (1st request to my Spring Boot application from frond-end) Spring boot application redirect it Azure login page.
  2. User enters his credentials
  3. Authorization server sends POST request to redirect_uri, this request have the authorization_code along with other user info(like first name, last name and user id).
  4. Then I get bearer token and refresh_token using authorization_code

Now I want to sent bearer_token to other microservice which will validate the bearer_token.

My question is how can validate bearer_token and retrieve the owner of that token in other microservices ?

3 Answers
Related