def UseBasicAuth(service, username, password, for_proxy=False):
 deprecation('calling deprecated function UseBasicAuth')
 base_64_string = base64.encodestring(('%s:%s' % (username, password)))
 base_64_string = base_64_string.strip()
 if for_proxy:
  header_name = 'Proxy-Authorization'
 else:
  header_name = 'Authorization'
 service.additional_headers[header_name] = ('Basic %s' % (base_64_string,))

def UseBasicAuth ( service , username , password , for_proxy = False ) : deprecation ( 'calling deprecated function UseBasicAuth' ) base_64_string = base64 . encodestring ( ( '%s:%s' % ( username , password ) ) ) base_64_string = base_64_string . strip ( ) if for_proxy : header_name = 'Proxy-Authorization' else : header_name = 'Authorization' service . additional_headers [ header_name ] = ( 'Basic %s' % ( base_64_string , ) )
sets an authenticaiton: basic http header containing plaintext .