(self, username=None, password=None, auth_provider='negotiate', send_cbt=True, service='WSMAN',
                 delegate=False, hostname_override=None, wrap_required=False)
Creates a HTTP auth context that uses Microsoft's Negotiate protocol
        to complete the auth process. This currently only supports the NTLM
        and Kerberos providers in the Negotiate protocol.

        :param username: The username to authenticate with, if not specified
            this will be with the user currently logged in (Windows only) or
            the default Kerberos ticket in the cache
        :param password: The password for username, if not specified this will
            try to use implicit credentials available to the user
        :param auth_provider: The authentication provider to use
            'negotiate': Will try to use Kerberos if available and fallback to
                NTLM if that fails
            'ntlm': Will only use NTLM
            'kerberos': Will only use Kerberos and will fail if this is not
                available
        :param send_cbt: Try to bind the channel token (HTTPS only) to the auth
            process, default is True
        :param service: The service part of the SPN to authenticate with,
            defaults to HTTP
        :param delegate: Whether to get an auth token that allows the token to
            be delegated to other servers, this is only used with Kerberos and
            defaults to False
        :param hostname_override: Override the hostname used as part of the
            SPN, by default the hostname is based on the URL of the request
        :param wrap_required: Whether message encryption (wrapping) is
            required (controls what auth context is used)
Creates a HTTP auth context that uses Microsoft's Negotiate protocol
        to complete the auth process. This currently only supports the NTLM
        and Kerberos providers in the Negotiate protocol.
Creates a HTTP auth context that uses Microsoft s Negotiate protocol to complete the auth process . This currently only supports the NTLM and Kerberos providers in the Negotiate protocol .
def __init__(self, username=None, password=None, auth_provider='negotiate', send_cbt=True, service='WSMAN',
                 delegate=False, hostname_override=None, wrap_required=False):
        """
        Creates a HTTP auth context that uses Microsoft's Negotiate protocol
        to complete the auth process. This currently only supports the NTLM
        and Kerberos providers in the Negotiate protocol.

        :param username: The username to authenticate with, if not specified
            this will be with the user currently logged in (Windows only) or
            the default Kerberos ticket in the cache
        :param password: The password for username, if not specified this will
            try to use implicit credentials available to the user
        :param auth_provider: The authentication provider to use
            'negotiate': Will try to use Kerberos if available and fallback to
                NTLM if that fails
            'ntlm': Will only use NTLM
            'kerberos': Will only use Kerberos and will fail if this is not
                available
        :param send_cbt: Try to bind the channel token (HTTPS only) to the auth
            process, default is True
        :param service: The service part of the SPN to authenticate with,
            defaults to HTTP
        :param delegate: Whether to get an auth token that allows the token to
            be delegated to other servers, this is only used with Kerberos and
            defaults to False
        :param hostname_override: Override the hostname used as part of the
            SPN, by default the hostname is based on the URL of the request
        :param wrap_required: Whether message encryption (wrapping) is
            required (controls what auth context is used)
        """
        self.username = username
        self.password = password
        self.auth_provider = auth_provider
        self.send_cbt = send_cbt
        self.service = service
        self.delegate = delegate
        self.hostname_override = hostname_override
        self.wrap_required = wrap_required
        self.contexts = {}

        self._regex = re.compile(r'(Kerberos|Negotiate|NTLM)\s*([^,]*),?', re.I)
def __init__ ( self , username = None , password = None , auth_provider = 'negotiate' , send_cbt = True , service = 'WSMAN' , delegate = False , hostname_override = None , wrap_required = False ) : self . username = username self . password = password self . auth_provider = auth_provider self . send_cbt = send_cbt self . service = service self . delegate = delegate self . hostname_override = hostname_override self . wrap_required = wrap_required self . contexts = { } self . _regex = re . compile ( r'(Kerberos|Negotiate|NTLM)\s*([^,]*),?' , re . I )