Search code examples
asp.net-web-api2identityserver3bearer-token

Forward Bearer Token IdentityServer Web-API


I have a Web Application that needs to call a Web API, using a bearer token. This service will need to call a common service on its own with the user credentials included.

So: Client --> API1 --> API2

Can somebody help me if it is possible to:
- or ask a for a new server to server token for API1 to API2 with the user claims included
- or re-use the received token for the server to server call


Solution

  • If you host both apis, then you can just forward the access token. It is rather difficult to create a new token with the user credentials from an access token.

    The token can be validated on both APIs, and you have the user claims on both APIs.