Re: Authentication in pipes and filters ???

2015-04-17 Thread Cristiano Costantini
Hi Willem, hi all, thank you for your support, I wanted to avoid to throw an exception, because then I have to handle it in order to return proper payload (I want empty payload if the user is not authenticated) in the response. I've maybe found a different approach that I am now investigating:

Re: Authentication in pipes and filters ???

2015-04-17 Thread Cristiano Costantini
Yeah! There is a drawback! :-( Exchange.ROUTE_STOP stops completely the processing of the exchange, not only the current route! My routes are something like this: route id=httpRoute from uri=jetty:http://0.0.0.0:8090/mobile; / to uri=direct:gsonDeserialization / /route route

Authentication in pipes and filters ???

2015-04-16 Thread Cristiano Costantini
Hello, I was searching to implement a Pipes and Filter EIP that, as the picture illustrated in http://camel.apache.org/pipes-and-filters.html, it has a step that Authenticates the exchange. I have not however figured out how to manage a failed authentication: how do I best implement the

Re: Authentication in pipes and filters ???

2015-04-16 Thread Willem Jiang
I think you can just throw out the authentication failure exception and you can use the error handler to setup some kind of reject exception for the response to use. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com