ADMIN API: Deletes a specified session. If username is present on the request, validates that the session being deleted is associated with the user.
()
| 262 | // ADMIN API: Deletes a specified session. If username is present on the request, validates |
| 263 | // that the session being deleted is associated with the user. |
| 264 | func (h *handler) deleteUserSession() error { |
| 265 | h.assertAdminOnly() |
| 266 | userName := h.PathVar("name") |
| 267 | if userName != "" { |
| 268 | return h.deleteUserSessionWithValidation(h.PathVar("sessionid"), userName) |
| 269 | } else { |
| 270 | return h.db.Authenticator(h.ctx()).DeleteSession(h.ctx(), h.PathVar("sessionid"), "") |
| 271 | } |
| 272 | } |
| 273 | |
| 274 | // ADMIN API: Deletes all sessions for a user |
| 275 | func (h *handler) deleteUserSessions() error { |
nothing calls this directly
no test coverage detected