axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gAm <geir.am...@usit.uio.no>
Subject Re: AXIS2 1.1.1 problem with BASIC AUTH
Date Sun, 22 Apr 2007 20:57:10 GMT


aassif wrote:
> 
> I went through the whole discussion and when tried to implement BASIC
> Authentication I can't find the Authenticator class, the one which I can
> locate is only HttpTransportProperties.Authenticator.
> 

It was HttpTransportProperties.Authenticator that was used. My apologies for
causing confusion - I should absolutely have used the full notation for the
inner class.

        // Strings 'username' and 'password' presupposed, 
        // as well as an Options object 'options'
        :
 
        HttpTransportProperties.Authenticator authenticator =
    	    new HttpTransportProperties.Authenticator();
    	
        List<String> auth = new ArrayList<String>();
        auth.add(HttpTransportProperties.Authenticator.BASIC);
        authenticator.setAuthSchemes(auth);

        authenticator.setUsername(username);
        authenticator.setPassword(password);
        authenticator.setPreemptiveAuthentication(true);

        options.setProperty(HTTPConstants.AUTHENTICATE, authenticator);

        :
        //


aassif wrote:
> 
> But HttpTransportProperties.Authenticator doesn't have any property BASIC
> and seems to be different from Authenticator class used in the thread. 
> 

I believe 'BASIC' is a static field of HttpTransportProperties.Authenticator
in Axis2 v1.1.1, at least.
See 
http://ws.apache.org/axis2/1_1_1/api/org/apache/axis2/transport/http/HttpTransportProperties.Authenticator.html#field_detail
HttpTransportProperties.Authenticator Field Detail .

Sincerely,
  Geir Amdal

-- 
View this message in context: http://www.nabble.com/AXIS2-1.1.1-problem-with-BASIC-AUTH-tf3559184.html#a10128688
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message