【发布时间】:2016-08-02 17:30:56
【问题描述】:
我们正在使用 Cookie 和 WsFederation 中间件对 ADFS 服务器进行身份验证。一切正常,除了生成的 cookie 总是会话过期。
当用户关闭并重新打开浏览器时,他们需要重新登录。
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = WsFederationAuthenticationDefaults.AuthenticationType,
CookieDomain = "...some domain..."
});
app.UseWsFederationAuthentication(new WsFederationAuthenticationOptions
{
MetadataAddress = ConfigurationManager.AppSettings[AdfsMetadataAddress],
Wtrealm = ConfigurationManager.AppSettings[AppWtRealm],
UseTokenLifetime = false
});
为了让cookie在浏览器端持久化,我们需要做些什么?
先谢谢了~
【问题讨论】:
标签: asp.net authentication cookies owin federation