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

Method ActiveTokenWithRefresh

internal/gh/gh.go:230–230  ·  view source on GitHub ↗

ActiveTokenWithRefresh retrieves the active credential for the given hostname and, when it is refreshable and its access token is expiring, renews and persists it. It may return a non-empty credential with an error, such as when refreshing fails. The caller decides whether to use the returned creden

(hostname string)

Source from the content-addressed store, hash-verified

228 // its access token is expiring, renews and persists it. It may return a non-empty credential with an error, such
229 // as when refreshing fails. The caller decides whether to use the returned credential.
230 ActiveTokenWithRefresh(hostname string) (credential Credential, refreshResult RefreshStatus, err error)
231
232 // Warnings returns the deduplicated warnings recorded so far in this process, such as a skipped token refresh, in
233 // the order they were first recorded. Callers are expected to show them to the user before gh exits.

Callers 1

Implementers 1

AuthConfiginternal/config/config.go

Calls

no outgoing calls

Tested by 1