def do_signup(self, full_id, password, invite=None, autoconf=False): logger.debug('SIGNUP for %s' % full_id) _, provider_id = config.get_username_and_provider(full_id) provider = config.Provider(provider_id, autoconf=autoconf) d = provider.callWhenReady( self._do_signup, provider, full_id, password, invite) return d
def do_signup(self, full_id, password): log.msg('SIGNUP for %s' % full_id) _, provider_id = config.get_username_and_provider(full_id) provider = config.Provider(provider_id) d = provider.callWhenReady(self._do_signup, provider, full_id, password) return d
def do_authenticate(self, full_id, password, autoconf=False): _, provider_id = config.get_username_and_provider(full_id) provider = config.Provider(provider_id, autoconf=autoconf) def maybe_finish_provider_bootstrap(result, provider): session = self._get_session(provider, full_id, password) d = provider.download_services_config_with_auth(session) d.addCallback(lambda _: result) return d d = provider.callWhenReady( self._do_authenticate, provider, full_id, password) d.addCallback(maybe_finish_provider_bootstrap, provider) return d
def _get_provider_from_full_userid(userid): _, provider_id = config.get_username_and_provider(userid) return config.Provider(provider_id)
def do_get_provider(self, provider_id, autoconf=False): provider = config.Provider(provider_id, autoconf=autoconf) return provider.callWhenReady(provider.config)
def _get_provider_from_full_userid(userid): _, provider_id = config.get_username_and_provider(userid) # TODO -- this autoconf should be passed from the # command flag. workaround to get cli workinf for now. return config.Provider(provider_id, autoconf=True)
def do_get_service(self, provider_id, service, autoconf=False): provider = config.Provider(provider_id, autoconf=autoconf) return provider.callWhenMainConfigReady(provider.config, service)