cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: BASIC http Auth
Date Fri, 10 Dec 2010 16:00:33 GMT
On Friday 10 December 2010 9:03:50 am phperret@gmail.com wrote:
> Hello,
> 
> How a basic authentifiaction should be set up ?
> 
> I suppose it's by using the ClientProxy but there is no documentation about
> that.

This is part of the JAX-WS spec.  If you have the proxy object, you can just 
do:

((BindingProvider)proxy).getRequestContext()
    .put(BindingProvider.USERNAME_PROPERTY, "dkulp");
((BindingProvider)proxy).getRequestContext()
    .put(BindingProvider.PASSWORD_PROPERTY, "mypassword");

to provide the credentials for the BasicAuth.

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Mime
View raw message