MCPcopy Create free account
hub / github.com/docker/cli / storeCredentialsInStore

Method storeCredentialsInStore

cli/config/credentials/native_store.go:103–116  ·  view source on GitHub ↗

storeCredentialsInStore executes the command to store the credentials in the native store.

(config types.AuthConfig)

Source from the content-addressed store, hash-verified

101
102// storeCredentialsInStore executes the command to store the credentials in the native store.
103func (c *nativeStore) storeCredentialsInStore(config types.AuthConfig) error {
104 creds := &credentials.Credentials{
105 ServerURL: config.ServerAddress,
106 Username: config.Username,
107 Secret: config.Password,
108 }
109
110 if config.IdentityToken != "" {
111 creds.Username = tokenUsername
112 creds.Secret = config.IdentityToken
113 }
114
115 return client.Store(c.programFunc, creds)
116}
117
118// getCredentialsFromStore executes the command to get the credentials from the native store.
119func (c *nativeStore) getCredentialsFromStore(serverAddress string) (types.AuthConfig, error) {

Callers 1

StoreMethod · 0.95

Calls 1

StoreMethod · 0.65

Tested by

no test coverage detected