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

Struct sequencedAuthConfig

pkg/cmd/agent-task/capi/client_test.go:24–29  ·  view source on GitHub ↗

sequencedAuthConfig returns a different credential on each call and records the hostname it was asked about, so a test can prove the transport resolves a token per request rather than once at construction time.

Source from the content-addressed store, hash-verified

22// sequencedAuthConfig returns a different credential on each call and records the hostname it was asked about, so a
23// test can prove the transport resolves a token per request rather than once at construction time.
24type sequencedAuthConfig struct {
25 creds []gh.Credential
26 status gh.RefreshStatus
27 err error
28 calls []string
29}
30
31func (s *sequencedAuthConfig) ActiveTokenWithRefresh(hostname string) (gh.Credential, gh.RefreshStatus, error) {
32 cred := s.creds[len(s.calls)]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected