Store saves the given credentials in the file store.
(authConfig types.AuthConfig)
| 88 | |
| 89 | // Store saves the given credentials in the file store. |
| 90 | func (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. |
| 103 | func (c *nativeStore) storeCredentialsInStore(config types.AuthConfig) error { |