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

Method Store

cli/config/credentials/native_store.go:90–100  ·  view source on GitHub ↗

Store saves the given credentials in the file store.

(authConfig types.AuthConfig)

Source from the content-addressed store, hash-verified

88
89// Store saves the given credentials in the file store.
90func (c *nativeStore) Store(authConfig types.AuthConfig) error {
91 if err := c.storeCredentialsInStore(authConfig); err != nil {
92 return err
93 }
94 authConfig.Username = ""
95 authConfig.Password = ""
96 authConfig.IdentityToken = ""
97
98 // Fallback to old credential in plain text to save only the email
99 return c.fileStore.Store(authConfig)
100}
101
102// storeCredentialsInStore executes the command to store the credentials in the native store.
103func (c *nativeStore) storeCredentialsInStore(config types.AuthConfig) error {

Calls 2

StoreMethod · 0.65