public DeleteSession ( string sessionId ) : bool | ||
sessionId | string | |
return | bool |
/// <summary> /// Process logs this user out and destroys their current session /// <summary> public void Process(UriWrapper uri, IHttpProcessor processor, User user) { // Destroy session if (user.DeleteSession(user.SessionId)) { logger.IfInfo(String.Format("Logged out user, destroyed session: [user: {0}, key: {1}]", user.UserName, user.SessionId)); processor.WriteJson(new LogoutResponse(null, user.SessionId)); return; } processor.WriteJson(new LogoutResponse("Failed to destroy user session", user.SessionId)); return; }