title: How to verify LDAP username and password via an authenticated connection?
body: <p>Currently, I have 1 user have the permission to bind OpenDJ server. Then I need to verify the username and password from the end user. How can I do that? </p>
  
  <p>This is the way I create the LDAP connection and bind successfully:</p>
  
  <pre><code>LdapConnection connection = new LdapConnection("opendj.mydn.com.vn");
  //Set session options
  connection.SessionOptions.SecureSocketLayer = false;
  connection.AuthType = AuthType.Basic;
  connection.Bind(new NetworkCredential("myuser", "mypassword"));
  </code></pre>
  
  <p>After that, I need to use this connection to verify the <code>"user1"</code> and <code>"password1"</code>. </p>
  
  <p>How can I query this action? </p>
  
  <p>This is the configuration of OpenDJ:</p>
  
  <pre><code>Host_LDAP=opendj.mydn.com.vn
  dn_LDAP=ou\=People,dc\=mydn,dc\=com
  #uid_LDAP=uid\=webservice,ou\=People,dc\=mydn,dc\=com
  uid_LDAP=webservice
  admin_LDAP_verify_attr=uid
  admin_LDAP_verify_dn=ou\=People,dc\=mydn,dc\=com
  </code></pre>