我正在使用Wep Api作为后端编写基因敲除应用程序。我使用这tutorial来实现令牌承载授权,所以我有访问令牌,但是登录功能是在外部提供的。 我需要实现的是在一段时间后注销,例如1小时,如果所有的时间活动 - 在更长的时间之后 - 10小时。所以,我有我的设置如下图所示:令牌承载认证 - 在不活动时间后注销
OAuthAuthorizationServerOptions OAuthServerOptions = new OAuthAuthorizationServerOptions()
{
AllowInsecureHttp = true,
TokenEndpointPath = new PathString("/token"),
AccessTokenExpireTimeSpan = TimeSpan.FromHours(10),
Provider = container.Resolve<IOAuthAuthorizationServerProvider>()
};
和它的作品 - 在10小时后访问已被撤销,但如何实现处于非活动状态1小时后注销?我想知道某些使用刷新令牌或实施会话到应用程序。
你想用刷新标记来实现什么。 –