Exemplo n.º 1
0
        public string get_multiple_cookies()
        {
            _writer.AppendCookie(new Cookie("Foo", "1"));
            _writer.AppendCookie(new Cookie("Bar", "2"));

            return("Just look at the cookies");
        }
Exemplo n.º 2
0
        public void Erase()
        {
            var cookie = new HttpCookie(_cookieName)
            {
                Expires = _time.UtcNow().AddYears(-1)
            };

            _writer.AppendCookie(cookie);
        }
Exemplo n.º 3
0
        public AntiForgeryData SetCookieToken(string path, string domain)
        {
            var             applicationPath = _fubuApplicationFiles.RootPath;
            AntiForgeryData token           = GetCookieToken();
            string          name            = _tokenProvider.GetTokenName(applicationPath);
            string          cookieValue     = _serializer.Serialize(token);

            var newCookie = new Cookie(name, HttpUtility.UrlEncode(cookieValue))
            {
                HttpOnly = true, Domain = domain
            };

            if (!string.IsNullOrEmpty(path))
            {
                newCookie.Path = path;
            }
            _outputWriter.AppendCookie(newCookie);

            return(token);
        }
Exemplo n.º 4
0
 public string get_is_a_partial(PartialInput input)
 {
     _outputWriter.AppendCookie(new Cookie("key", "value"));
     return("I am some partial text!");
 }
Exemplo n.º 5
0
 public void AppendCookie(HttpCookie cookie)
 {
     _inner.AppendCookie(cookie);
 }
Exemplo n.º 6
0
 public void post_write_cookie(WriteCookieRequest request)
 {
     _writer.AppendCookie(new Core.Http.Cookies.Cookie(request.Name, request.Value));
 }
Exemplo n.º 7
0
 public void AppendCookie(HttpCookie cookie)
 {
     // TODO -- trace
     _inner.AppendCookie(cookie);
 }