[英]how to get access token via identityserver4 via method (not api)?
您可以通过请求令牌来获得令牌(如下例所示)。
但是,如何从Identityserver类中获取(客户端凭据)访问令牌(不通过http POST Web服务api请求它)? 是否有一个identityserver4方法可用于获取访问令牌?
http://docs.identityserver.io/en/release/endpoints/token.html
POST /connect/token
client_id=client1&
client_secret=secret&
grant_type=authorization_code&
code=hdh922&
redirect_uri=https://myapp.com/callback
是的,您可以使用IdentityServerTools
类中的IssueJwtAsync
或IssueClientJwtAsync
方法来精确地做到这一点。
根据文档 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.