/// <summary> /// Creates a new instance of the context object. /// </summary> /// <param name="context"></param> /// <param name="ticket">Contains the initial values for identity and extra data</param> /// <param name="options"></param> public CookieValidatePrincipalContext(HttpContext context, AuthenticationTicket ticket, CookieAuthenticationOptions options) : base(context, options) { if (context == null) { throw new ArgumentNullException(nameof(context)); } if (ticket == null) { throw new ArgumentNullException(nameof(ticket)); } if (options == null) { throw new ArgumentNullException(nameof(options)); } Principal = ticket.Principal; Properties = ticket.Properties; }
/// <summary> /// Creates a new context object. /// </summary> /// <param name="context">The HTTP request context</param> /// <param name="options">The cookie middleware options</param> /// <param name="redirectUri">The initial redirect URI</param> /// <param name="properties">The <see cref="AuthenticationProperties"/>.</param> public CookieRedirectContext(HttpContext context, CookieAuthenticationOptions options, string redirectUri, AuthenticationProperties properties) : base(context, options) { RedirectUri = redirectUri; Properties = properties; }