Exemple #1
0
 public bool TryGetKeyed(string name, out KeyedCookie output)
 {
     HttpCookie cookie;
         if (TryGetCookie(name, out cookie)) {
             output = new KeyedCookie(cookie);
             return true;
         }
         output = null;
         return false;
 }
Exemple #2
0
 /*
  * Creates & saves the login cookie
  */
 public void Login(User user)
 {
     KeyedCookie cookie;
     if (!TryGetCookie(out cookie)) {
         cookie = new KeyedCookie("login");
     }
     cookie.Values["email"] = user.Email;
     cookie.Values["password"] = user.HashedPassword;
     cookieRepo.Save(cookie);
 }
Exemple #3
0
 bool TryGetCookie(out KeyedCookie cookie)
 {
     return cookieRepo.TryGetKeyed("login", out cookie);
 }