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

Method HasActiveToken

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

223type AuthConfig interface {
224 // HasActiveToken returns true when a token for the hostname is present.
225 HasActiveToken(hostname string) bool
226
227 // ActiveTokenWithRefresh retrieves the active credential for the given hostname and, when it is refreshable and
228 // 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