def EnsureAuthenticated(self, force):
    'Best effort check that user is authenticated with Rietveld server.'
    if self._auth_config.use_oauth2:
        authenticator = auth.get_authenticator_for_host(self.GetCodereviewServer(), self._auth_config)
        if (not authenticator.has_cached_credentials()):
            raise auth.LoginRequiredError(self.GetCodereviewServer())
Best effort check that user is authenticated with Rietveld server.
def EnsureAuthenticated(self, force):
    
    if self._auth_config.use_oauth2:
        authenticator = auth.get_authenticator_for_host(self.GetCodereviewServer(), self._auth_config)
        if (not authenticator.has_cached_credentials()):
            raise auth.LoginRequiredError(self.GetCodereviewServer())