MCPcopy Create free account
hub / github.com/basecamp/hey-cli / Save

Method Save

internal/auth/store.go:74–80  ·  view source on GitHub ↗

Save stores credentials for the given origin.

(origin string, creds *Credentials)

Source from the content-addressed store, hash-verified

72
73// Save stores credentials for the given origin.
74func (s *Store) Save(origin string, creds *Credentials) error {
75 s.ensureInit()
76 if s.useKeyring {
77 return s.saveToKeyring(origin, creds)
78 }
79 return s.saveToFile(origin, creds)
80}
81
82// Delete removes credentials for the given origin.
83func (s *Store) Delete(origin string) error {

Callers 9

TestSaveLoadRoundTripFunction · 0.45
TestDeleteCredentialsFunction · 0.45
TestMultipleOriginsFunction · 0.45
TestFilePermissionsFunction · 0.45
LoginMethod · 0.45
LoginWithTokenMethod · 0.45
LoginWithCookieMethod · 0.45
refreshLockedMethod · 0.45
TestTokenRefreshOnExpiryFunction · 0.45

Calls 3

ensureInitMethod · 0.95
saveToKeyringMethod · 0.95
saveToFileMethod · 0.95

Tested by 5

TestSaveLoadRoundTripFunction · 0.36
TestDeleteCredentialsFunction · 0.36
TestMultipleOriginsFunction · 0.36
TestFilePermissionsFunction · 0.36
TestTokenRefreshOnExpiryFunction · 0.36