【发布时间】:2020-06-30 08:31:43
【问题描述】:
从 module-zero-template 的 Startup 方法的代码中,更改 cookie 身份验证的选项非常简单:
public void Configuration(IAppBuilder app)
{
app.UseAbp();
app.UseOAuthBearerAuthentication(AccountController.OAuthBearerOptions); // I want to change the default AccessTokenExpireTimeSpan value, here
app.UseCookieAuthentication(new CookieAuthenticationOptions {
ExpireTimeSpan = ..., // this can be simply changed!
SlidingExpiration = ..., // this can be simply changed!
...
});
...
}
我想知道如何为UseOAuthBearerAuthentication(参见上一行代码)配置一些选项,以便它们与cookie身份验证的选项保持一致。
问题在于此类配置选项(例如AccessTokenExpireTimeSpan 或AllowInsecureHttp)仅在OAuthAuthorizationServerOptions 类中可用。
我怎样才能修改上面的代码来做到这一点?
【问题讨论】:
标签: asp.net-mvc-5 aspnetboilerplate