MCPcopy Create free account
hub / github.com/cli/cli / SetActiveToken

Method SetActiveToken

internal/config/config.go:419–423  ·  view source on GitHub ↗

SetActiveToken will override any token resolution and return the given token and source for all calls to ActiveToken. Use for testing purposes only.

(token, source string)

Source from the content-addressed store, hash-verified

417// SetActiveToken will override any token resolution and return the given
418// token and source for all calls to ActiveToken. Use for testing purposes only.
419func (c *AuthConfig) SetActiveToken(token, source string) {
420 c.tokenOverride = func(_ string) (string, string) {
421 return token, source
422 }
423}
424
425// TokenFromKeyring will retrieve the auth token for the given hostname,
426// only searching in encrypted storage.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected