On Wed July 22 2009 3:19:27 pm Sergey Beryozkin wrote: > Hi > > If it is JAXRS then you can register a CXF JAX-RS filter, retrieve > AuthorizationPolicy.class instance from a message, get user/password and if > needed return a Response setting 401. > > You can also check the incoming headers in the CXF Interceptor, however I'm > not sure if it is possible to cause 401 actually reported. You may need to > throw a Fault instance from your input interceptor and also register an > inFaultInterceptor. Dan, is it possible to do produce a custom response > code this way ?
Yea. That's probably the preferred way. You MAY be able to get the HttpServletRequest from the message and just send a 401 back directly, then pause the chain and return. That might work as well. Not really sure. Dan > > cheers, Sergey > > Raphaël Flores-2 wrote: > > Hi all, I'd like to make my application server sending a 401 HTTP status > > to client side for the client side user must enter his login/password. > > > > Is it programmatically possible to directly modify HTTP Headers with > > CXF, or is there something already made for that ? If yes, could one > > guide me to resources please. > > > > Thanks > > > > -- > > Raphael F. -- Daniel Kulp [email protected] http://www.dankulp.com/blog
