If I have a usergrid generated user access token, how do I get the user profile (username, organization, etc.) information from it ?
I am planning to expose a REST api service which would use usergrid as a backend to store multitenant data.
The REST api service has some business logic and which will query data from usergrid, carry out business logic and return results.
I am thinking that the user of this service will first authenticate using an authentication api (which is another REST API I am planning to expose). They will pass their username and password and organization details to the authentication api, which in turn will call the usergrid token api to validate the user and send back the access token as a response to the request.
The subsequent request to the business service api will pass the access token. Now given this access token I wanted to know the user details say username, so that I could query the right data for that user (e.g. apply a filter condition like "where createdBY = :username") and feed it to the business logic.
Is it possible ?