@Override
                public void handle(IAsyncResult<ILdapResult> result) {
                    if (result.isSuccess()) {
                        if (LdapResultCode.isSuccess(result.getResult().getResultCode())) {
                            handler.handle(AsyncResultImpl.create(Boolean.TRUE));
                        } else { // An auth failure
                            handler.handle(AsyncResultImpl.create(Boolean.FALSE));
                        }
                    } else { // Unexpected exception
                        handler.handle(AsyncResultImpl.<Boolean>create(result.getError()));
                    }
                }
@see io.apiman.gateway.engine.policies.auth.IIdentityValidator#validate(java.lang.String, java.lang.String, io.apiman.gateway.engine.beans.ApiRequest, io.apiman.gateway.engine.policy.IPolicyContext, java.lang.Object, io.apiman.gateway.engine.async.IAsyncResultHandler)
gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/auth/LDAPIdentityValidator.java