Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I issue an access token to the identityserver itself?

This may be a dumb question, but here goes :)

I have the following applications in this problem:

  • An IdentityServer3
  • A WebApi2 application which uses the Identityserver as its authenticator
  • MVC web app

What I want to do, is to call a secured service on the WebApi from the IdentityServer, but in order to do so I require an access token.

How do I within the IdentityServer issue an access token to itself (which in order will be authenticated through itself from the WebApi)

like image 870
Lundsern Avatar asked Mar 11 '23 12:03

Lundsern


1 Answers

IdentityServer includes an OWIN extension method that allows issuing tokens directly - no need to go through one of the protocol flows.

It is called IssueClientToken and is documented here:

https://identityserver.github.io/Documentation/docsv2/advanced/owin.html

like image 62
leastprivilege Avatar answered Apr 01 '23 23:04

leastprivilege