ResolveAuthConfig returns auth-config for the given registry from the credential-store. It returns an empty AuthConfig if no credentials were found. Deprecated: this function is no longer used, and will be removed in the next release.
(cfg *configfile.ConfigFile, index *registrytypes.IndexInfo)
| 41 | // |
| 42 | // Deprecated: this function is no longer used, and will be removed in the next release. |
| 43 | func ResolveAuthConfig(cfg *configfile.ConfigFile, index *registrytypes.IndexInfo) registrytypes.AuthConfig { |
| 44 | configKey := index.Name |
| 45 | if index.Official { |
| 46 | configKey = authConfigKey |
| 47 | } |
| 48 | |
| 49 | a, _ := cfg.GetAuthConfig(configKey) |
| 50 | return registrytypes.AuthConfig{ |
| 51 | Username: a.Username, |
| 52 | Password: a.Password, |
| 53 | ServerAddress: a.ServerAddress, |
| 54 | |
| 55 | // TODO(thaJeztah): Are these expected to be included? |
| 56 | Auth: a.Auth, |
| 57 | IdentityToken: a.IdentityToken, |
| 58 | RegistryToken: a.RegistryToken, |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | // GetDefaultAuthConfig gets the default auth config given a serverAddress |
| 63 | // If credentials for given serverAddress exists in the credential store, the configuration will be populated with values in it |
nothing calls this directly
no test coverage detected
searching dependent graphs…