コード例 #1
0
        public void WriteCookie(HttpResponse response, string userId, string employerAccountId)
        {
            var protectedValue = _dataProtector.Protect($"{userId}-{employerAccountId}");

            response.Cookies.Append(CookieNames.LevyEmployerIndicator, protectedValue, EsfaCookieOptions.GetDefaultHttpCookieOption(_hostingEnvironment));
        }
コード例 #2
0
        public void WriteCookie(HttpResponse response, string userId, string employerAccountId, string employerAccountType)
        {
            var protectedValue = _dataProtector.Protect(userId + '/' + employerAccountId + '/' + employerAccountType);

            response.Cookies.Append(CookieNames.EmployerAccountType, protectedValue, EsfaCookieOptions.GetDefaultHttpCookieOption(_hostingEnvironment));
        }
コード例 #3
0
        public void WriteCookie(HttpResponse response, string userId, string employerAccountId, bool hasLevyDeclaration)
        {
            var protectedValue = _dataProtector.Protect(userId + "/" + employerAccountId + "/" + hasLevyDeclaration);

            response.Cookies.Append(CookieNames.LevyEmployerIndicator, protectedValue, EsfaCookieOptions.GetDefaultHttpCookieOption(_hostingEnvironment));
        }