MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / DeleteSession

Method DeleteSession

auth/session.go:215–225  ·  view source on GitHub ↗
(ctx context.Context, sessionID string, username string)

Source from the content-addressed store, hash-verified

213}
214
215func (auth Authenticator) DeleteSession(ctx context.Context, sessionID string, username string) error {
216 err := auth.datastore.Delete(auth.DocIDForSession(sessionID))
217 if err == nil {
218 auditFields := base.AuditFields{base.AuditFieldSessionID: sessionID}
219 if username != "" {
220 auditFields[base.AuditFieldUserName] = username
221 }
222 base.Audit(ctx, base.AuditIDPublicUserSessionDeleted, auditFields)
223 }
224 return err
225}

Callers 4

TestDeleteSessionFunction · 0.80
deleteUserSessionMethod · 0.80

Calls 3

DocIDForSessionMethod · 0.95
AuditFunction · 0.92
DeleteMethod · 0.45

Tested by 1

TestDeleteSessionFunction · 0.64