【发布时间】:2021-03-18 15:39:47
【问题描述】:
我正在使用 IdentityServer4 来保护我的 API-s。 我用这些参数创建了客户端:
AccessTokenType = 1 //引用令牌 AllowOfflineAccess = 1 //允许刷新令牌的属性
我正在调用这个方法来同时请求引用令牌和刷新令牌:
var tokenResponse = await client.RequestPasswordTokenAsync(new PasswordTokenRequest
{
Address = disco.TokenEndpoint,
ClientId = ConfigurationExt.IdentityServer.ClientId,
ClientSecret = ConfigurationExt.IdentityServer.ClientSecret,
UserName = userName,
Password = passwordHash,
Parameters = parameters,
Scope = ConfigurationExt.IdentityServer.Scope,
});
但我的 refreshToken 为空
是否可以同时获取刷新和引用令牌?
【问题讨论】:
标签: c# identityserver4