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

Method LoginRefreshable

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

LoginRefreshable stores a refreshable credential for the given user, sets the git protocol, and marks the user active for the hostname. Like Login it prefers encrypted storage and falls back to the insecure configuration, reporting the fallback via the returned bool. Any non-expiring token stored fo

(hostname, username string, credential Credential, gitProtocol string, secureStorage bool)

Source from the content-addressed store, hash-verified

287 // reporting the fallback via the returned bool. Any non-expiring token stored for the same user is removed so it
288 // cannot outrank the refreshable record.
289 LoginRefreshable(hostname, username string, credential Credential, gitProtocol string, secureStorage bool) (insecureStorageUsed bool, err error)
290
291 // SwitchUser switches the active user for a given hostname.
292 SwitchUser(hostname, user string) error

Implementers 1

AuthConfiginternal/config/config.go

Calls

no outgoing calls