C# OWIN Cookie身份验证-等效于FormsAuthentication.CookieName?

C# OWIN Cookie身份验证-等效于FormsAuthentication.CookieName?,c#,asp.net,asp.net-mvc,forms-authentication,owin,C#,Asp.net,Asp.net Mvc,Forms Authentication,Owin,我在OWIN应用程序中使用新的ASP.NET Identity 2。我的代码与此类似: app.UseCookieAuthentication(new CookieAuthenticationOptions { AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie, LoginPath = new PathString("/"), CookieDomain = "mysite.local",

我在OWIN应用程序中使用新的ASP.NET Identity 2。我的代码与此类似:

app.UseCookieAuthentication(new CookieAuthenticationOptions
{
    AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
    LoginPath = new PathString("/"),
    CookieDomain = "mysite.local",
    CookieName = "MySite.SSO",
    SlidingExpiration = true,
    ExpireTimeSpan = new TimeSpan(1, 0, 0, 0)
});
当我以前使用FormsAuthentication时,如果我想检索cookie的名称或域,我会执行以下操作:

FormsAuthentication.CookieName

FormsAuthentication.CookieDomain
等等


我如何配置我的应用程序与此有什么相同之处?我真的不想通过
Web.config设置它,然后用这种方式检索它。

设置好之后,为什么需要检索cookie名称?你对cookie无能为力,因为它是加密的。如果我需要获取身份验证cookie的名称和域以将其注入API调用中。