MCPcopy Index your code
hub / github.com/ZenNotes/zennotes / sessionLogout

Method sessionLogout

apps/server/internal/httpserver/security.go:488–494  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

486}
487
488func (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

Callers

nothing calls this directly

Calls 5

clearSessionCookieMethod · 0.95
currentConfigMethod · 0.95
writeJSONFunction · 0.85
sessionStatusPayloadFunction · 0.85
deleteMethod · 0.80

Tested by

no test coverage detected