MCPcopy Index your code
hub / github.com/PatchMon/PatchMon / RevokeByID

Method RevokeByID

server-source-code/internal/store/sessions.go:198–201  ·  view source on GitHub ↗

RevokeByID revokes a session by ID.

(ctx context.Context, id, userID string)

Source from the content-addressed store, hash-verified

196
197// RevokeByID revokes a session by ID.
198func (s *SessionsStore) RevokeByID(ctx context.Context, id, userID string) error {
199 d := s.db.DB(ctx)
200 return d.Queries.RevokeSessionByID(ctx, db.RevokeSessionByIDParams{ID: id, UserID: userID})
201}
202
203// RevokeAllForUser revokes all sessions for a user except the given session ID.
204func (s *SessionsStore) RevokeAllForUser(ctx context.Context, userID, exceptSessionID string) error {

Callers 4

AuthWithSessionCheckFunction · 0.45
RevokeMethod · 0.45
LogoutMethod · 0.45
RevokeSessionMethod · 0.45

Calls 2

DBMethod · 0.65
RevokeSessionByIDMethod · 0.65

Tested by

no test coverage detected