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

Method HasActiveToken

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

224type AuthConfig interface {
225 // HasActiveToken returns true when a token for the hostname is present.
226 HasActiveToken(hostname string) bool
227
228 // ActiveTokenWithRefresh retrieves the active credential for the given hostname and, when it is refreshable and
229 // its access token is expiring, renews and persists it. It may return a non-empty credential with an error, such

Callers 4

NewTrustedRootCmdFunction · 0.65
TestHasActiveTokenFunction · 0.65
TestHasNoActiveTokenFunction · 0.65

Implementers 1

AuthConfiginternal/config/config.go

Calls

no outgoing calls

Tested by 3

TestHasActiveTokenFunction · 0.52
TestHasNoActiveTokenFunction · 0.52