logout: fix stale revokeCurrentFunc doc comment · Entire
logout: fix stale revokeCurrentFunc doc comment
ddb0807·
toothbrush·1mo ago·1 file·+4 added/-4 removed
The comment claimed the impl resolves its own data-API bearer; the caller now resolves the active context's core URL + token and binds them into the closure. Describe the actual contract.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
Sessions
2525dd1ceb9fView transcript
?\
Refine logout Command with --all-contexts FlagClaude Code·1 step
Changes
1
cmd/entire/cli
Mlogout.go+4/-4
18 unmodified lines
19
20
21
22
23
24
25
22
23
24
25
26
27
28
18 unmodified lines
DeleteToken(baseURL string) error
}
// revokeCurrentFunc revokes the CLI's current token server-side. The
// implementation resolves its own data-API bearer (same audience-
// matching rule as sessionLister); callers don't pass the keyring
// entry through.
// revokeCurrentFunc revokes the CLI's current login session server-side.
// The caller resolves the active context's core URL + bearer up-front and
// binds them into the closure, so the revocation hits the same core that
// `auth status` lists.
type revokeCurrentFunc func(ctx context.Context) error
// clearContextFunc removes the active contexts.json context (and its
Mcmd/entire/cli/logout.go+4/-4