/** * Creates a new bind request protocol op from the provided bind request * object. * * @param request The simple bind request to use to create this protocol op. * It must have been created with a static password rather * than using a password provider. * * @throws LDAPSDKUsageException If the provided simple bind request is * configured to use a password provider * rather than a static password. */ public BindRequestProtocolOp(final SimpleBindRequest request) throws LDAPSDKUsageException { version = 3; credentialsType = CRED_TYPE_SIMPLE; bindDN = request.getBindDN(); simplePassword = request.getPassword(); saslMechanism = null; saslCredentials = null; if (simplePassword == null) { throw new LDAPSDKUsageException( ERR_BIND_REQUEST_CANNOT_CREATE_WITH_PASSWORD_PROVIDER.get()); } }
/** * Creates a new bind request protocol op from the provided bind request * object. * * @param request The simple bind request to use to create this protocol op. * It must have been created with a static password rather * than using a password provider. * * @throws LDAPSDKUsageException If the provided simple bind request is * configured to use a password provider * rather than a static password. */ public BindRequestProtocolOp(final SimpleBindRequest request) throws LDAPSDKUsageException { version = 3; credentialsType = CRED_TYPE_SIMPLE; bindDN = request.getBindDN(); simplePassword = request.getPassword(); saslMechanism = null; saslCredentials = null; if (simplePassword == null) { throw new LDAPSDKUsageException( ERR_BIND_REQUEST_CANNOT_CREATE_WITH_PASSWORD_PROVIDER.get()); } }