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

Method HasActiveToken

internal/config/config.go:392–394  ·  view source on GitHub ↗

HasActiveToken returns true when a token for the hostname is present.

(hostname string)

Source from the content-addressed store, hash-verified

390
391// HasActiveToken returns true when a token for the hostname is present.
392func (c *AuthConfig) HasActiveToken(hostname string) bool {
393 return c.ActiveToken(hostname).Token != ""
394}
395
396// HasEnvToken returns true when a token has been specified in an
397// environment variable, else returns false.

Callers

nothing calls this directly

Calls 1

ActiveTokenMethod · 0.95

Tested by

no test coverage detected