BindingDataCreator<?> bindingCreator = getBindingDataCreator(camelExchange);
CamelBindingData bindingData = bindingCreator.createBindingData(camelExchange.getIn());
if (bindingData instanceof SecurityBindingData) {
// returned binding is contains some security bindings, let's move them to security context
ServiceDomain serviceDomain = ((SwitchYardCamelContext)camelExchange.getContext()).getServiceDomain();
SecurityContextManager securityContextManager = new SecurityContextManager(serviceDomain);
securityContextManager.addCredentials(switchyardExchange, ((SecurityBindingData)bindingData).extractCredentials());
}
/*
* initialize the gateway name on the context. this was most likely not
* mapped by the message composer/context mapper.