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

Method TokenFromKeyring

internal/config/config.go:312–314  ·  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

310// TokenFromKeyring will retrieve the auth token for the given hostname,
311// only searching in encrypted storage.
312func (c *AuthConfig) TokenFromKeyring(hostname string) (string, error) {
313 return keyring.Get(keyringServiceName(hostname), "")
314}
315
316// TokenFromKeyringForUser will retrieve the auth token for the given hostname
317// 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