Uid authenticate(ObjectClass objectClass, String username, GuardedString password, OperationOptions options)
Connectordeveloper is expected to attempt to authenticate these credentials natively. If the authentication fails the developer should throw a type of
IllegalArgumentExceptionor if a native exception is available and if its of type
RuntimeExceptionsimple throw it. If the native exception is not a
RuntimeExceptionwrap it in one and throw it. This will provide the most detail for logging problem and failed attempts.
The developer is of course encourage to try and throw the most
informative exception as possible. In that regards there are several
exceptions provided in the exceptions package. For instance one of the
most common is
objectClass- The object class to use for authenticate. Will typically be an account. Must not be null.
username- the name based credential for authentication.
password- the password based credential for authentication.
options- additional options that impact the way this operation is run. If the caller passes null, the framework will convert this into an empty set of options, so SPI need not worry about this ever being null.
RuntimeException- if native authentication fails. If a native exception if available attempt to throw it.
Copyright © 2018. All rights reserved.