def _initialize_registry(self, adapters, backoff_strategy): auth = AuthFactory.create(auth_type=AuthType.NO_AUTH) auth.register_adapters(adapters) http_executor = http.HttpExecutor( auth, proxies=self._proxies, user_agent=self._user_agent, session=auth.session, request_timeout=self._request_timeout, correlation_id=self._correlation_id, backoff_strategy=backoff_strategy) return registry.Registry(self._registry_url, http_executor)
def _initialize_registry(self, adapters, backoff_strategy, content_type, **auth_kwargs): auth = AuthFactory.create(**auth_kwargs) if auth_kwargs.get("auth_type", None) == AuthType.MUTUAL else AuthFactory.create( auth_type=AuthType.NO_AUTH) auth.register_adapters(adapters) http_executor = http.HttpExecutor(auth, proxies=self._proxies, user_agent=self._user_agent, session=auth.session, request_timeout=self._request_timeout, correlation_id=self._correlation_id, user_id=self.user_id, application_id=self.application_id, backoff_strategy=backoff_strategy, content_type=content_type) return registry.Registry(self._registry_url, http_executor)