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

Method Authentication

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

124// that dependencies supplied after construction, such as the token refresher, remain visible to every caller. All of
125// its read methods are safe to share, and the few write methods are only used within the auth command set.
126func (c *cfg) Authentication() gh.AuthConfig {
127 if c.auth == nil {
128 c.auth = &AuthConfig{cfg: c.cfg}
129 }
130 return c.auth
131}
132
133func (c *cfg) AccessibleColors(hostname string) gh.ConfigEntry {
134 // 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