def _authenticate_user_dn(self, password):
if self.dn is None:<EOL><INDENT>raise self.AuthenticationFailed("<STR_LIT>")<EOL><DEDENT>try:<EOL><INDENT>sticky = self.settings.BIND_AS_AUTHENTICATING_USER<EOL>self._bind_as(self.dn, password, sticky=sticky)<EOL><DEDENT>except ldap.INVALID_CREDENTIALS:<EOL><INDENT>raise self.AuthenticationFailed("<STR_LIT>")<EOL><DEDENT>
Binds to the LDAP server with the user's DN and password. Raises
AuthenticationFailed on failure.