bind method

  1. @override
Future<LdapResult> bind({
  1. String? DN,
  2. String? password,
})
override

Performs an LDAP BIND operation.

Sends a bind request using the credentials that were set by the constructor or passed in via DN and password. If DN or password are provided, the values are saved for future bind operations.

Returns a Future containing the result of the BIND operation.

Implementation

@override
Future<LdapResult> bind({String? DN, String? password}) async {
  loggerConnection.fine('bind: ${_bindDN.isEmpty ? 'anonymous' : _bindDN}');

  _bindDN = DN ?? _bindDN;
  _password = password ?? _password;

  return _doBind(BindRequest(_bindDN, _password));
}