(w http.ResponseWriter, r *http.Request)
| 438 | } |
| 439 | |
| 440 | func (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 | } |
nothing calls this directly
no test coverage detected