public ChunkingHttpCookie(IOptions <CookieManagerOptions> optionAccessor)
 {
     // Lowest common denominator. Safari has the lowest known limit (4093), and we leave little extra just in case.
     // See http://browsercookielimits.x64.me/.
     // Leave at least 40 in case CookiePolicy tries to add 'secure', 'samesite=strict' and/or 'httponly'.
     _cookieManagerOptions = optionAccessor.Value;
 }
Exemple #2
0
 /// <summary>
 /// External depedenacy of <see cref="IHttpContextAccessor" />
 /// </summary>
 /// <param name="httpAccessor">IHttpAccessor</param>
 /// <param name="dataProtectionProvider">data protection provider</param>
 /// <param name="optionAccessor">cookie manager option accessor</param>
 public HttpCookie(IHttpContextAccessor httpAccessor,
                   IDataProtectionProvider dataProtectionProvider,
                   IOptions <CookieManagerOptions> optionAccessor)
 {
     _httpContext          = httpAccessor.HttpContext;
     _dataProtector        = dataProtectionProvider.CreateProtector(Purpose);
     _cookieManagerOptions = optionAccessor.Value;
     _chunkingHttpCookie   = new ChunkingHttpCookie(optionAccessor);
 }