def __init__(self, service_name='app_identity_service',
               email_address=None, private_key_path=None,
               oauth_url=None):
    super(KeyBasedAppIdentityServiceStub, self).__init__(service_name)
    self.__x509_init_lock = threading.Lock()
    self.__access_token_cache_lock = threading.Lock()
    self.__default_gcs_bucket_name = (
        app_identity_stub.APP_DEFAULT_GCS_BUCKET_NAME)
    if email_address is None:
      raise ValueError('Email address for service account must be specified.')
    self.__email_address = email_address
    if private_key_path is None:
      raise ValueError('Path to the private key must be specified '
                       'if an email address is specified.')
    if not os.path.exists(private_key_path):
      raise ValueError(private_key_path + ' not found.')
    if private_key_path.endswith('.p12'):

      raise ValueError(('Please convert .p12 format to .pem format: '
                        'cat %s | openssl pkcs12 -nodes -nocerts -passin '
                        'pass:notasecret | openssl rsa > %s') % (
                            private_key_path,
                            '%s.pem' % os.path.splitext(private_key_path)[0]))
    self.__private_key = rsa.key.PrivateKey.load_pkcs1(
        file(private_key_path, 'rb').read(), 'PEM')
    self.__access_token_cache = {}
    self.__x509 = None
    self.__signing_key = None
    self.__oauth_url = oauth_url or _DEFAULT_OAUTH_URL
Constructor.
dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/api/app_identity/app_identity_keybased_stub.py/KeyBasedAppIdentityServiceStub.__init__