【发布时间】:2018-08-15 21:05:58
【问题描述】:
我尝试将我的隐式客户端的 AccessTokenLifetime 属性设置为 90 秒。客户端是一个javascript应用程序。
但是,在令牌应该过期后大约 5 分钟,客户端仍然能够访问 api 范围“api1”。
这是 IdentityServer4 中客户端配置的代码:
// JavaScript Client
new Client
{
ClientId = "js",
ClientName = "JavaScript Client",
AllowedGrantTypes = GrantTypes.Implicit,
AllowAccessTokensViaBrowser = true,
RedirectUris = { "http://localhost:5003/callback.html" },
PostLogoutRedirectUris = { "http://localhost:5003/index.html" },
AllowedCorsOrigins = { "http://localhost:5003" },
AllowedScopes =
{
IdentityServerConstants.StandardScopes.OpenId,
IdentityServerConstants.StandardScopes.Profile,
"api1"
},
AccessTokenLifetime = 90
}
我正在使用来自 IdentityServer github repo 的 Javascript 快速入门解决方案 https://github.com/IdentityServer/IdentityServer4.Samples/tree/release/Quickstarts/7_JavaScriptClient
【问题讨论】:
标签: identityserver4