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

Method TokenFromKeyring

internal/config/config.go:319–321  ·  view source on GitHub ↗

TokenFromKeyring will retrieve the auth token for the given hostname, only searching in encrypted storage.

(hostname string)

Source from the content-addressed store, hash-verified

317// TokenFromKeyring will retrieve the auth token for the given hostname,
318// only searching in encrypted storage.
319func (c *AuthConfig) TokenFromKeyring(hostname string) (string, error) {
320 return keyring.Get(keyringServiceName(hostname), "")
321}
322
323// TokenFromKeyringForUser will retrieve the auth token for the given hostname
324// and username, only searching in encrypted storage.

Callers 1

ActiveTokenMethod · 0.95

Calls 2

GetFunction · 0.92
keyringServiceNameFunction · 0.70

Tested by

no test coverage detected