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

Method LoginRefreshable

internal/gh/gh.go:290–290  ·  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

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

Implementers 1

AuthConfiginternal/config/config.go

Calls

no outgoing calls