예제 #1
0
 public HttpCookie(IHttpContextAccessor httpAccessor, IDataProtectionProvider dataProtectionProvider, IOptions <CookieManagerOptions> optionAccessor)
 {
     _httpContext          = httpAccessor.HttpContext;
     _dataProtector        = dataProtectionProvider.CreateProtector(Purpose);
     _cookieManagerOptions = optionAccessor.Value;
     _chunkingHttpCookie   = new ChunkingHttpCookie(optionAccessor);
 }
 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;
 }