(w http.ResponseWriter, r *http.Request)
| 486 | } |
| 487 | |
| 488 | func (s *Server) sessionLogout(w http.ResponseWriter, r *http.Request) { |
| 489 | if cookie, err := r.Cookie(sessionCookieName); err == nil { |
| 490 | s.sessions.delete(cookie.Value) |
| 491 | } |
| 492 | http.SetCookie(w, s.clearSessionCookie(r)) |
| 493 | writeJSON(w, http.StatusOK, sessionStatusPayload(false, s.currentConfig())) |
| 494 | } |
| 495 | |
| 496 | // sessionRotateToken replaces the bootstrap auth token with a caller- |
| 497 | // supplied value. Requires the *current* token in the body even when |
nothing calls this directly
no test coverage detected