【发布时间】:2017-05-24 10:04:54
【问题描述】:
我使用 Microsoft.Owin.Security、Microsoft.Owin.Security.OpenIDConnect 和 Microsoft.Owin.Security.Cookies 库。它工作正常,我可以创建一个安全 cookie。
但在安全 cookie 中是域AAA.de。如何将 cookie 中的域更改为 .AAA.de ?
这是我用来登录用户的代码。
public void SignIn()
{
if (!Request.IsAuthenticated)
{
HttpContext.GetOwinContext().Authentication.Challenge(
new AuthenticationProperties(
new Dictionary<string, string>
{
{Startup.PolicyKey, Startup.SignInPolicyId}
})
{
RedirectUri = Redirect,
}, OpenIdConnectAuthenticationDefaults.AuthenticationType);
}
}
感谢您的帮助。
【问题讨论】:
标签: asp.net-mvc-3 owin.security