コード例 #1
0
 def __init__(self, **kwargs):
     HttpTransport.__init__(self, **kwargs)
     self.pm = urllib2.HTTPPasswordMgrWithDefaultRealm()
     self.handler =\
       HTTPNtlmAuthHandler.HTTPNtlmAuthHandler(self.pm)
     self.urlopener = urllib2.build_opener(self.handler)
     urllib2.install_opener(self.urlopener)
コード例 #2
0
ファイル: https.py プロジェクト: uhla/suds-sw
    def __init__(self, **kwargs):
        """
        @param kwargs: Keyword arguments.
            - B{proxy} - An http proxy to be specified on requests.
                 The proxy is defined as {protocol:proxy,}
                    - type: I{dict}
                    - default: {}
            - B{timeout} - Set the url open timeout (seconds).
                    - type: I{float}
                    - default: 90
            - B{username} - The username used for http authentication.
                    - type: I{str}
                    - default: None
            - B{password} - The password used for http authentication.
                    - type: I{str}
                    - default: None
            - B{unverified_context} - Use an unverified context for the
                 connection, i.e. disabling HTTPS certificate validation.
                    - type: I{bool}
                    - default: False
        """
        HttpTransport.__init__(self, **kwargs)
        self.pm = urllib.request.HTTPPasswordMgrWithDefaultRealm()

        if self.options.unverified_context:
            import ssl
            self.HTTPSHandler = urllib.request.HTTPSHandler(
                context=ssl._create_unverified_context())
        else:
            self.HTTPSHandler = urllib.request.HTTPSHandler()
コード例 #3
0
 def __init__(self, slug=None, session=None, related_objects=None, timeout=None):
     self.related_objects = related_objects or ()
     self.slug = slug
     self.timeout = timeout
     # super won't work because not using new style class
     HttpTransport.__init__(self)
     self._session = session or security_requests.SecuritySession()
コード例 #4
0
ファイル: https.py プロジェクト: ticosax/suds-ng
    def __init__(self, **kwargs):
        """
        @param kwargs: Keyword arguments.
            - B{proxy} - An http proxy to be specified on requests.
                 The proxy is defined as {protocol:proxy,}
                    - type: I{dict}
                    - default: {}
            - B{timeout} - Set the url open timeout (seconds).
                    - type: I{float}
                    - default: 90
            - B{username} - The username used for http authentication.
                    - type: I{str}
                    - default: None
            - B{password} - The password used for http authentication.
                    - type: I{str}
                    - default: None
            - B{unverified_context} - Use an unverified context for the
                 connection, i.e. disabling HTTPS certificate validation.
                    - type: I{bool}
                    - default: False
        """
        HttpTransport.__init__(self, **kwargs)
        self.pm = urllib.request.HTTPPasswordMgrWithDefaultRealm()

        if self.options.unverified_context:
            import ssl

            self.HTTPSHandler = urllib.request.HTTPSHandler(context=ssl._create_unverified_context())
        else:
            self.HTTPSHandler = urllib.request.HTTPSHandler()
コード例 #5
0
 def __init__(self, key, cert, *args, **kwargs):
     """
     @param key: full path for the client's private key file
     @param cert: full path for the client's PEM certificate file
     """
     HttpTransport.__init__(self, *args, **kwargs)
     self.key = key
     self.cert = cert
コード例 #6
0
ファイル: https.py プロジェクト: AlainRoy/htcondor
 def __init__(self, key, cert, *args, **kwargs):
     """
     @param key: full path for the client's private key file
     @param cert: full path for the client's PEM certificate file
     """
     HttpTransport.__init__(self, *args, **kwargs)
     self.key = key
     self.cert = cert
コード例 #7
0
ファイル: https.py プロジェクト: ssorj/boneyard
 def __init__(self, key, cert, *args, **kwargs):
     """
     @param key: full path for the client's private key file
     @param cert: full path for the client's PEM certificate file
     """
     HttpTransport.__init__(self, *args, **kwargs)
     self.key = key
     self.cert = cert
     self.urlopener = u2.build_opener(self._get_auth_handler())
コード例 #8
0
ファイル: https.py プロジェクト: JasonSupena/suds
 def __init__(self, **kwargs):
     """
     @param kwargs: Keyword arguments.
         - B{proxy} - An http proxy to be specified on requests.
              The proxy is defined as {protocol:proxy,}
                 - type: I{dict}
                 - default: {}
         - B{timeout} - Set the url open timeout (seconds).
                 - type: I{float}
                 - default: 90
         - B{username} - The username used for http authentication.
                 - type: I{str}
                 - default: None
         - B{password} - The password used for http authentication.
                 - type: I{str}
                 - default: None
     """
     HttpTransport.__init__(self, **kwargs)
     self.pm = u2.HTTPPasswordMgrWithDefaultRealm()
コード例 #9
0
ファイル: https.py プロジェクト: levacorp/LevaCorp
 def __init__(self, **kwargs):
     """
     @param kwargs: Keyword arguments.
         - B{proxy} - An http proxy to be specified on requests.
              The proxy is defined as {protocol:proxy,}
                 - type: I{dict}
                 - default: {}
         - B{timeout} - Set the url open timeout (seconds).
                 - type: I{float}
                 - default: 90
         - B{username} - The username used for http authentication.
                 - type: I{str}
                 - default: None
         - B{password} - The password used for http authentication.
                 - type: I{str}
                 - default: None
     """
     HttpTransport.__init__(self, **kwargs)
     self.pm = HTTPPasswordMgrWithDefaultRealm()
コード例 #10
0
    def __init__(self, **kwargs):
        """
        Provides a throttled HTTP transport for respecting rate limits
        on rate-restricted SOAP APIs using :mod:`suds`.

        This class is a :class:`suds.transport.Transport` subclass
        based on the default ``HttpAuthenticated`` transport.

        :param minimum_spacing: Minimum number of seconds between requests.
                                Default 0.
        :type minimum_spacing: int

        .. todo::
            Use redis or so to coordinate between threads to allow a
            maximum requests per hour/day limit.

        """
        self._minumum_spacing = kwargs.pop('minimum_spacing', 0)
        self._last_called = int(time.time())
        HttpTransport.__init__(self, **kwargs)
コード例 #11
0
ファイル: www.py プロジェクト: chintal/tendril
    def __init__(self, **kwargs):
        """
        Provides a throttled HTTP transport for respecting rate limits
        on rate-restricted SOAP APIs using :mod:`suds`.

        This class is a :class:`suds.transport.Transport` subclass
        based on the default ``HttpAuthenticated`` transport.

        :param minimum_spacing: Minimum number of seconds between requests.
                                Default 0.
        :type minimum_spacing: int

        .. todo::
            Use redis or so to coordinate between threads to allow a
            maximum requests per hour/day limit.

        """
        self._minumum_spacing = kwargs.pop('minimum_spacing', 0)
        self._last_called = int(time.time())
        HttpTransport.__init__(self, **kwargs)
コード例 #12
0
ファイル: https.py プロジェクト: tic-ull/defensatfc-proto
 def __init__(self, **kwargs):
     """
     @param kwargs: Keyword arguments.
         - B{proxy} - An http proxy to be specified on requests.
              The proxy is defined as {protocol:proxy,}
                 - type: I{dict}
                 - default: {}
         - B{cache} - The http I{transport} cache.  May be set (None) for no caching.
                 - type: L{Cache}
                 - default: L{NoCache}
         - B{username} - The username used for http authentication.
                 - type: I{str}
                 - default: None
         - B{password} - The password used for http authentication.
                 - type: I{str}
                 - default: None
     """
     HttpTransport.__init__(self, **kwargs)
     self.pm = u2.HTTPPasswordMgrWithDefaultRealm()
     self.handler = u2.HTTPBasicAuthHandler(self.pm)
     self.urlopener = u2.build_opener(self.handler)
コード例 #13
0
ファイル: sslsuds.py プロジェクト: VladimirVoronov/odoo8
	def __init__(self, key, cert, **kwargs):
		HttpTransport.__init__(self, **kwargs)
		self.urlopener = urllib2.build_opener(HTTPSClientAuthHandler(key, cert))
コード例 #14
0
 def __init__(self, cert, key, options=Options()):
     HttpTransport.__init__(self)
     self.handler = HTTPSClientAuthHandler(cert, key)
     self.urlopener = build_opener(self.handler)
コード例 #15
0
 def __init__(self, key, cert, **kwargs):
     HttpTransport.__init__(self, **kwargs)
     self.urlopener = urllib2.build_opener(HTTPSClientAuthHandler(
         key, cert))
コード例 #16
0
 def __init__(self, key, cert, endereco, *args, **kwargs):
     HttpTransport.__init__(self, *args, **kwargs)
     self.key = key
     self.cert = cert
     self.endereco = endereco
コード例 #17
0
 def __init__(self, *args, **kwargs):
     HttpTransport.__init__(self, *args, **kwargs)
コード例 #18
0
 def __init__(self, cert, key, options=Options()):
     HttpTransport.__init__(self, options)
     self.handler = HTTPSClientAuthHandler(cert, key)
     self.urlopener = urllib2.build_opener(self.handler)
コード例 #19
0
 def __init__(self, cert, key, capath, *args, **kwargs):
     '''initialise'''
     HttpTransport.__init__(self, *args, **kwargs)
     self.urlopener = urllib2.build_opener(HTTPSClientAuthHandler(cert,
                                                                  key,
                                                                  capath))
コード例 #20
0
ファイル: soap-play.py プロジェクト: ryanrampage1/Securitas
 def __init__(self, key, cert, *args, **kwargs):
     HttpTransport.__init__(self, *args, **kwargs)
     self.key = key
     self.cert = cert
コード例 #21
0
ファイル: soapconnector.py プロジェクト: lsimons/crichton
 def __init__(self, key, cert, options = Options()):
     HttpTransport.__init__(self)
     self.urlopener = urllib2.build_opener(HTTPSClientAuthHandler(key, cert))
コード例 #22
0
ファイル: modulator.py プロジェクト: yupasik/AT
 def __init__(self):
     HttpTransport.__init__(self)
     self._handler = HTTPHandler()
コード例 #23
0
 def __init__(self, key, cert, *args, **kwargs):
     HttpTransport.__init__(self, *args, **kwargs)
     self.key = key
     self.cert = cert
コード例 #24
0
 def __init__(self, options):
     HttpTransport.__init__(self, options)
     self.pm = u2.HTTPPasswordMgrWithDefaultRealm()
     self.handler = u2.HTTPBasicAuthHandler(self.pm)
     self.urlopener = u2.build_opener(self.handler)
コード例 #25
0
 def __init__(self, context, *args, **kwargs):
     HttpTransport.__init__(self, *args, **kwargs)
     self.context = context
コード例 #26
0
ファイル: https.py プロジェクト: analytehealth/suds
 def __init__(self, **kwargs):
     HttpTransport.__init__(self, **kwargs)
     self.urlopener = u2.build_opener(HTTPSClientAuthHandler(self.options.keyfile, self.options.certfile))
コード例 #27
0
 def __init__(self, **kwargs):
     HttpTransport.__init__(self, **kwargs)
     self.urlopener = u2.build_opener(
         HTTPSClientAuthHandler(self.options.keyfile,
                                self.options.certfile))
コード例 #28
0
ファイル: transport.py プロジェクト: luojus/bankws
 def __init__(self, *args, **kwargs):
     HttpTransport.__init__(self, *args, **kwargs)
コード例 #29
0
ファイル: client.py プロジェクト: jkinred/psphere
 def __init__(self, context, *args, **kwargs):
     HttpTransport.__init__(self, *args, **kwargs)
     self.context = context
コード例 #30
0
 def __init__(self, key, cert, proxy_settings=None, *args, **kwargs):
     HttpTransport.__init__(self, *args, **kwargs)
     self.key = key
     self.cert = cert
     self.proxy_settings = proxy_settings
コード例 #31
0
ファイル: sdkDeploy.py プロジェクト: fabregas/old_projects
 def __init__(self, cert, key):
     HttpTransport.__init__(self)
     self.handler = HTTPSClientAuthHandler(cert, key)
     self.urlopener = urllib2.build_opener(self.handler)
コード例 #32
0
ファイル: https_nfse.py プロジェクト: ElissandroMendes/PyNFe
 def __init__(self, key, cert, endereco, *args, **kwargs):
     HttpTransport.__init__(self, *args, **kwargs)
     self.key = key
     self.cert = cert
     self.endereco = endereco