IdentityServer4 icon indicating copy to clipboard operation
IdentityServer4 copied to clipboard

Nested APIs/API calls within api calls.

Open jonathh21 opened this issue 9 years ago • 3 comments

I have asked a question about this on SO but it has attracted little interested.. given that and the fact that I can't find people asking this question makes me wonder if I am wildl off the mark..

https://stackoverflow.com/questions/46308536/reusing-a-bearer-token-for-multiple-api-calls

Basically I have a number of APIs that all use other APIs to n depth. Each might be consumed by other applications or exposed themselves in their own right.

What is the best practice wrt token authentication?

It seems sensible to be that the initial landing would request a token (I'd like to map a windows user to a set of scopes) and that token is then reused through the estate - as long as it has sufficient scope to access the next api.

If not, then where would I store the token for the intra api hop? I don't want to have to authorise and request a token for each call when I should be able to store a token and use it time and time again.

Any pointers/help/guidance very gratefully received...

#question

jonathh21 avatar Sep 20 '17 12:09 jonathh21

I'd be interested in others replying to this to validate my assumption which was the same as yours:

You simply pass along the token. Obviously the token needs the scopes for all api's it might hit. The MVC app owns the token and sends it as Bearer to an api, that api can simply re-send the same bearer token to any api's it consumes.

MatthewGabriel avatar Sep 20 '17 12:09 MatthewGabriel

This seems to be a general question about IdentityServer - not a bug report or an issue.

Please use one of the our free or commercial support options

See here for more details.

Thanks!

leastprivilege avatar Sep 21 '17 07:09 leastprivilege

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jan 14 '20 07:01 lock[bot]