【发布时间】:2018-12-09 10:17:48
【问题描述】:
我正在使用 IdentityServerTools 生成令牌:
private async Task<string> CreatePaymentsTokenAsync()
{
var tokenLifeTime = 3600;
var scopes = new[] { CoinbaseAuthConsts.PaymentScope };
// Use in-built Identity Server tools to issue JWT
var token = await _identityServerTools.IssueClientJwtAsync(
CoinbaseAuthConsts.AuthorityClientId,
tokenLifeTime, scopes, new[] { "AstootApi" });
return token;
}
如何向令牌添加声明?
【问题讨论】:
标签: c# authentication asp.net-core identityserver4