identityserver4asp.net-core-webapiapi-authorization

IdentityServer4 usage of IdentityServerTools to create a token from within identity server


I'm using IdentityServer4 and have a scenario where I need to initiate a call to a secured API during a password reset process. IdentityServer4 does provide IdentityServerTools for the purpose of calling a secured resource from an extensibility point, however there is currently no documentation or examples for the indented usage.

How does one go about creating the necessary token using the provided methods in IdentityServerTools?


Solution

  • IdentityServerTools is available from DI. Simply inject it into your class and call the method to create a client token.

    https://docs.identityserver.io/en/latest/topics/tools.html