【发布时间】:2019-06-25 06:26:04
【问题描述】:
我尝试使用以下方法获取访问和刷新令牌,但它返回 invalid_scope 和错误请求。如果我删除范围的 offline_scope 值,它仅返回访问令牌。
var tokenResponse = await protocolClient.RequestClientCredentialsTokenAsync(new ClientCredentialsTokenRequest
{
Address = disco.TokenEndpoint,
ClientId = ServiceIdentity,
ClientSecret = ServiceKey,
Scope = "offline_access",
GrantType = "GrantTypes.ClientCredentials"
});
return tokenResponse.AccessToken;
【问题讨论】:
标签: asp.net-core identityserver4 refresh-token