@Override
    public void validate(String username, String password, ApiRequest request, IPolicyContext context,
            StaticIdentitySource config, IAsyncResultHandler<Boolean> handler) {
        List<StaticIdentity> identities = config.getIdentities();
        for (StaticIdentity identity : identities) {
            if (identity.getUsername().equals(username) && identity.getPassword().equals(password)) {
                handler.handle(AsyncResultImpl.create(Boolean.TRUE));
                return;
            }
        }
        handler.handle(AsyncResultImpl.create(Boolean.FALSE));
    }
@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/StaticIdentityValidator.java