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

Method SetActiveToken

internal/config/config.go:395–399  ·  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

393// SetActiveToken will override any token resolution and return the given
394// token and source for all calls to ActiveToken. Use for testing purposes only.
395func (c *AuthConfig) SetActiveToken(token, source string) {
396 c.tokenOverride = func(_ string) (string, string) {
397 return token, source
398 }
399}
400
401// TokenFromKeyring will retrieve the auth token for the given hostname,
402// only searching in encrypted storage.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected