I want to call a ReST web service with a JAX-RS client based on CXF. That web 
service has a custom authentication based on cookies and challenge/response 
authentication. To get authenticated (i.e. whenever a regular call returns a 
401) a dedicated GET request must be issued to get the challenge, and then an 
additional POST request to authenticate the user (and get back an 
authentication token as cookie). Instead of doing the authentication explicitly 
I would rather call that whenever necessary (to also deal with cases where 
previous authentication became invalid), i.e. as Interceptor or as Filter. The 
question is, how do I retrigger the original request once the user has been 
successfully authenticated in a ClientResponseFilter or Interceptor in case a 
Has someone ever implemented something like this?

Reply via email to