MCPcopy Create free account
hub / github.com/dhij/ecomm / revokeSession

Method revokeSession

ecomm-api/handler/handler.go:440–452  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

438}
439
440func (h *handler) revokeSession(w http.ResponseWriter, r *http.Request) {
441 claims := r.Context().Value(authKey{}).(*token.UserClaims)
442
443 _, err := h.client.RevokeSession(h.ctx, &pb.SessionReq{
444 Id: claims.RegisteredClaims.ID,
445 })
446 if err != nil {
447 http.Error(w, "error revoking session", http.StatusInternalServerError)
448 return
449 }
450
451 w.WriteHeader(http.StatusNoContent)
452}

Callers

nothing calls this directly

Calls 1

RevokeSessionMethod · 0.65

Tested by

no test coverage detected