(ctx context.Context, sessionID string, username string)
| 213 | } |
| 214 | |
| 215 | func (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 | } |