fixes build

This commit is contained in:
Shannon
2016-01-06 10:47:58 +01:00
parent b0060a9592
commit dca6f2b42a

View File

@@ -89,38 +89,6 @@ namespace Umbraco.Web.Security.Identity
return cookieOptions;
}
/// <summary>
/// Creates the cookie options for saving the auth cookie
/// </summary>
/// <param name="ctx"></param>
/// <param name="ticket"></param>
/// <returns></returns>
public CookieOptions CreateRequestCookieOptions(IOwinContext ctx, AuthenticationTicket ticket)
{
if (ctx == null) throw new ArgumentNullException("ctx");
if (ticket == null) throw new ArgumentNullException("ticket");
var issuedUtc = ticket.Properties.IssuedUtc ?? SystemClock.UtcNow;
var expiresUtc = ticket.Properties.ExpiresUtc ?? issuedUtc.Add(ExpireTimeSpan);
var cookieOptions = new CookieOptions
{
Path = "/",
Domain = this.CookieDomain ?? null,
HttpOnly = true,
Secure = this.CookieSecure == CookieSecureOption.Always
|| (this.CookieSecure == CookieSecureOption.SameAsRequest && ctx.Request.IsSecure),
};
if (ticket.Properties.IsPersistent)
{
cookieOptions.Expires = expiresUtc.ToUniversalTime().DateTime;
}
return cookieOptions;
}
}
}