@@ -81,14 +81,14 @@ def _negotiate_value(response):
8181class HTTPSPNEGOAuth (AuthBase ):
8282 """Attaches HTTP GSSAPI Authentication to the given Request object."""
8383 def __init__ (self , mutual_authentication = REQUIRED , service = "HTTP" ,
84- delegate = False , force_preemptive = False , principal = None ,
84+ delegate = False , opportunistic_auth = False , principal = None ,
8585 hostname_override = None , sanitize_mutual_error_response = True ):
8686 self .context = {}
8787 self .mutual_authentication = mutual_authentication
8888 self .delegate = delegate
8989 self .pos = None
9090 self .service = service
91- self .force_preemptive = force_preemptive
91+ self .opportunistic_auth = opportunistic_auth
9292 self .principal = principal
9393 self .hostname_override = hostname_override
9494 self .sanitize_mutual_error_response = sanitize_mutual_error_response
@@ -283,7 +283,7 @@ def deregister(self, response):
283283 response .request .deregister_hook ('response' , self .handle_response )
284284
285285 def __call__ (self , request ):
286- if self .force_preemptive :
286+ if self .opportunistic_auth :
287287 # add Authorization header before we receive a 401
288288 # by the 401 handler
289289 host = urlparse (request .url ).hostname
0 commit comments