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

Method HasActiveToken

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

136type AuthConfig interface {
137 // HasActiveToken returns true when a token for the hostname is present.
138 HasActiveToken(hostname string) bool
139
140 // ActiveToken will retrieve the active auth token for the given hostname, searching environment variables,
141 // 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