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

Method LogoutWithCredential

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

LogoutWithCredential reloads the selected user's credential under the refresh mutex and attempts the advisory lock on a best-effort basis, passing any lock error to beforeLogout. The supplied save function persists a replacement refreshable credential in the same storage under the refresh mutex, eve

(hostname, username string, beforeLogout func(Credential, error, func(RefreshableCredential) error) error)

Source from the content-addressed store, hash-verified

303 // Local authentication is removed only if lookup and the callback succeed. The callback must not
304 // call other authentication operations that acquire the refresh lock.
305 LogoutWithCredential(hostname, username string, beforeLogout func(Credential, error, func(RefreshableCredential) error) error) error
306
307 // UsersForHost retrieves a list of users configured for a specific host.
308 UsersForHost(hostname string) []string

Callers 3

LogoutWithCredentialMethod · 0.65
logoutWithRevocationFunction · 0.65
TestLogoutWithCredentialFunction · 0.65

Implementers 1

AuthConfiginternal/config/config.go

Calls

no outgoing calls

Tested by 2

LogoutWithCredentialMethod · 0.52
TestLogoutWithCredentialFunction · 0.52