title: Active Directory authentication using ldap3 python, how to avoid clear text password
body: <p>I know the below question has been asked multiple times and answer which i could find is that get SSL certs. </p>
  
  <p>But how to go around it without SSL?</p>
  
  <p>Here is the problem:</p>
  
  <p>I have been implementing a Rest based API which authenticates a user with Active Directory. </p>
  
  <p>Our security team has concern that passing plain text password from UI to API is a security risk. </p>
  
  <p>But we are doing it because Active Directory needs password in plain text. 
  It just goes in JSON format in a POST request :</p>
  
  <pre><code>{"user":"uname","password":"password"}
  </code></pre>
  
  <p>Here is the AD auth code that i use from python ldap3 module.</p>
  
  <pre><code>    s = Server(AD_SERVER, port=AD_PORT, use_ssl=True, get_info=ALL)
      c = Connection(s, user=userName, password=password, authentication=NTLM)
      c.bind()
  </code></pre>
  
  <p>So in above is there a way to send password in any hash or any encrypted format. 
  I am not sure if Active Directory or ldap3 supports such mechanism for this connection.</p>
  
  <p>Any leads would be appreciated. </p>