|
From: Geyer, R. <Ran...@in...> - 2013-09-16 17:49:47
|
Hi all, I have an interesting ClientExecutionInterceptor use case that I've been trying to solve. I need to inject a session cookie from a cache into outgoing requests, that are sniffed from incoming responses and cached. The session cookie cache key is a combination of the user's credentials and the destination host. I retrieve the user's credentials from the container's security context, but I've been unable to find a reliable mechanism for determining the destination host in the ClientExecutionInterceptor. The ClientRequest host header has not been set when ClientExecutionInterceptor.execute() is called, so that doesn't work. I may have to fall back to an HttpClient HttpProcessor if I cannot solve this via RestEasy, but would prefer not to as that's a little too low level for my taste. Any ideas? Thanks - rg |