MCPcopy Create free account
hub / github.com/crewjam/saml / HandleDeleteSession

Method HandleDeleteSession

samlidp/session.go:178–185  ·  view source on GitHub ↗

HandleDeleteSession handles the `DELETE /sessions/:id` request. It invalidates the specified session.

(c web.C, w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

176// HandleDeleteSession handles the `DELETE /sessions/:id` request. It invalidates the
177// specified session.
178func (s *Server) HandleDeleteSession(c web.C, w http.ResponseWriter, r *http.Request) {
179 err := s.Store.Delete(fmt.Sprintf("/sessions/%s", c.URLParams["id"]))
180 if err != nil {
181 http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
182 return
183 }
184 w.WriteHeader(http.StatusNoContent)
185}

Callers

nothing calls this directly

Calls 2

DeleteMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected