MCPcopy
hub / github.com/docker/docker-py / get_all_credentials

Method get_all_credentials

docker/auth.py:285–303  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

283 return self.cred_helpers.get(registry) or self.creds_store
284
285 def get_all_credentials(self):
286 auth_data = self.auths.copy()
287 if self.creds_store:
288 # Retrieve all credentials from the default store
289 store = self._get_store_instance(self.creds_store)
290 for k in store.list().keys():
291 auth_data[k] = self._resolve_authconfig_credstore(
292 k, self.creds_store
293 )
294 auth_data[convert_to_hostname(k)] = auth_data[k]
295
296 # credHelpers entries take priority over all others
297 for reg, store_name in self.cred_helpers.items():
298 auth_data[reg] = self._resolve_authconfig_credstore(
299 reg, store_name
300 )
301 auth_data[convert_to_hostname(reg)] = auth_data[reg]
302
303 return auth_data
304
305 def add_auth(self, reg, data):
306 self['auths'][reg] = data

Calls 4

_get_store_instanceMethod · 0.95
convert_to_hostnameFunction · 0.85
listMethod · 0.45