Context
I have multiple services like :
- User (LDAP or active directory etc...)
- Billing
- Planning
- etc...
- Authentication
I need to connect on my microservices Using OAuth2.0, for beginning, using the standard login / password (I use my own data, and not gettint a third leg server)
Problem
According to these pictures :
Step 1

Step 2

How can I handle access_token control or authorization control, in my other services than authmicroservice ?


there is a tutorial and description of authentication flow in microservices in our activator, it's in Scala — http://www.typesafe.com/activator/template/reactive-microservices (source: https://github.com/theiterators/reactive-microservices)
The basic idea is: You need to validate authenticity of the auth token for every request. You can either:
— do it in a proxy (the gateway)
— do it inside the billing microservice
What we tend to do is: to validate Auth-Token inside every client-facing microservices.
— We keep the Auth-Token to User information inside Redis instance.
— The client-facing service asks the redis instance if this token is valid
— Redis returns some JSON string that we can use as a user-data for further authorization.
So the server side flow looks like this