On Tuesday 04 September 2007, Chris Campbell wrote:
> I am using basic-auth with an Interceptor to look up user
> credentials. However, in my WebService implementations I need to get
> the result of that lookup.
>
> Is there a sanctioned/best way to do this in CXF? Is there some sort
> of request context that I am missing?


Assuming JAX-WS, add:
    @Resource
    protected WebServiceContext wsContext;
to your impl.   The context will get injected into your impl.   From 
there, you should be able to do:
MessageContext mc = wsContext.getMessageContext();
mc.get(AuthorizationPolicy.class.getName());
or:
mc.get(BindingProvider.USER_NAME);
or similar to pull stuff out.

-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to