AuthorizationFailureEvent event = new AuthorizationFailureEvent(exchange, attributes, authenticated,
accessDeniedException);
publishEvent(event);
throw accessDeniedException;
}
publishEvent(new AuthorizedEvent(exchange, attributes, authenticated));
} catch (RuntimeException exception) {
exchange.getIn().setHeader(Exchange.AUTHENTICATION_FAILURE_POLICY_ID, getId());
CamelAuthorizationException authorizationException =
new CamelAuthorizationException("Cannot access the processor which has been protected.", exchange, exception);