Example #1
0
 def __init__(self, path, config, provider):
     self.oauth2_client = None
     if (provider.name == 'google'):
         if config.has_option('Credentials', 'gs_oauth2_refresh_token'):
             self.oauth2_client = oauth2_helper.OAuth2ClientFromBotoConfig(
                 config)
         elif config.has_option('GoogleCompute', 'service_account'):
             self.oauth2_client = oauth2_client.CreateOAuth2GCEClient()
     if not self.oauth2_client:
         raise NotReadyToAuthenticate()
 def __init__(self, path, config, provider):
     self.oauth2_client = None
     if (provider.name == 'google'):
         if config.has_option('GoogleCompute', 'service_account'):
             self.oauth2_client = oauth2_client.CreateOAuth2GCEClient()
         else:
             self.oauth2_client = oauth2_helper.OAuth2ClientFromBotoConfig(config)
             self.oauth2_client.cache_key_base = oauth.CLIENT_ID
     if not self.oauth2_client:
         raise auth_handler.NotReadyToAuthenticate()