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

Method TokenFromKeyring

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

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