public class MockIpWhitelistExecutor implements IAuthExecutor {
@Override
public AuthReport checkAllowed(Exchange exchange, Api api) {
AuthReport authReport = new AuthReport();
if(exchange.getIn().getHeaders().size() > 0) {
AuthIdentity authIdentity = new AuthIdentity();
authIdentity.setAppId("1234");
authReport.setAuthIdentity(authIdentity);
authReport.setApiActive(true);
authReport.setAuthActive(true);
} else {
authReport.setBadRequest(true);
}
//return exchange.getIn().getHeaders().size() > 0?new AppIdentity("1234"):null;
return authReport;