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

Method HasActiveToken

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

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