MCPcopy Index your code
hub / github.com/cli/cli / HasActiveToken

Method HasActiveToken

internal/gh/gh.go:107–107  ·  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

105type AuthConfig interface {
106 // HasActiveToken returns true when a token for the hostname is present.
107 HasActiveToken(hostname string) bool
108
109 // ActiveToken will retrieve the active auth token for the given hostname, searching environment variables,
110 // general configuration, and finally encrypted storage.

Callers 3

NewTrustedRootCmdFunction · 0.65
TestHasActiveTokenFunction · 0.65
TestHasNoActiveTokenFunction · 0.65

Implementers 1

AuthConfiginternal/config/config.go

Calls

no outgoing calls

Tested by 2

TestHasActiveTokenFunction · 0.52
TestHasNoActiveTokenFunction · 0.52