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

Method Authentication

internal/config/config.go:129–134  ·  view source on GitHub ↗

Authentication returns the single AuthConfig instance associated with this config. A single instance is returned so that dependencies supplied after construction, such as the token refresher, remain visible to every caller. All of its read methods are safe to share, and the few write methods are onl

()

Source from the content-addressed store, hash-verified

127// that dependencies supplied after construction, such as the token refresher, remain visible to every caller. All of
128// its read methods are safe to share, and the few write methods are only used within the auth command set.
129func (c *cfg) Authentication() gh.AuthConfig {
130 if c.auth == nil {
131 c.auth = &AuthConfig{cfg: c.cfg}
132 }
133 return c.auth
134}
135
136func (c *cfg) AccessibleColors(hostname string) gh.ConfigEntry {
137 // Intentionally panic if there is no user provided value or default value (which would be a programmer error)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected