You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Petri Hakala (JIRA)" <ji...@apache.org> on 2006/05/02 16:41:46 UTC

[jira] Created: (AXIS2-656) Support for basic authentication

Support for basic authentication
--------------------------------

         Key: AXIS2-656
         URL: http://issues.apache.org/jira/browse/AXIS2-656
     Project: Apache Axis 2.0 (Axis2)
        Type: New Feature

  Components: client-api  
    Reporter: Petri Hakala
    Priority: Minor


There is no support for basic authentication when making webservice calls via ServiceClient class. I see there is basic authentication support for proxy server but not for direct connection.

It would be nice to have something following:

ServiceClient client = new ServiceClient();
client.getOptions().setUsername("username");
client.getOptions().setPassword("password");

Axis 1.3 have these in class org.apache.axis.client.Stub.

-pete-


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS2-656) Support for basic authentication

Posted by "Petri Hakala (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-656?page=comments#action_12412746 ] 

Petri Hakala commented on AXIS2-656:
------------------------------------

I test this with latest snapshot and it worked as expected.

> Support for basic authentication
> --------------------------------
>
>          Key: AXIS2-656
>          URL: http://issues.apache.org/jira/browse/AXIS2-656
>      Project: Apache Axis 2.0 (Axis2)
>         Type: New Feature

>   Components: client-api
>     Reporter: Petri Hakala
>     Priority: Minor

>
> There is no support for basic authentication when making webservice calls via ServiceClient class. I see there is basic authentication support for proxy server but not for direct connection.
> It would be nice to have something following:
> ServiceClient client = new ServiceClient();
> client.getOptions().setUsername("username");
> client.getOptions().setPassword("password");
> Axis 1.3 have these in class org.apache.axis.client.Stub.
> -pete-

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (AXIS2-656) Support for basic authentication

Posted by "Saminda Wishwajith Abeyruwan (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-656?page=comments#action_12412175 ] 

Saminda Wishwajith Abeyruwan commented on AXIS2-656:
----------------------------------------------------

This has been fixed as follows,

Options options = new Options();
            options.setTo(targetEPR);

            HttpTransportProperties.BasicAuthentication
basicAuthentication = new HttpTransportProperties().new
BasicAuthentication();
            basicAuthentication.setUsername("username");
            basicAuthentication.setPassword("password");


options.setProperty(org.apache.axis2.transport.http.HTTPConstants.BASIC_AUTHENTICATION,basicAuthentication);


            //Blocking invocation
            ServiceClient sender = new ServiceClient();
            sender.setOptions(options);
            OMElement result = sender.sendReceive(payload);

Please test it and let us know, so that we can class the issue.

> Support for basic authentication
> --------------------------------
>
>          Key: AXIS2-656
>          URL: http://issues.apache.org/jira/browse/AXIS2-656
>      Project: Apache Axis 2.0 (Axis2)
>         Type: New Feature

>   Components: client-api
>     Reporter: Petri Hakala
>     Priority: Minor

>
> There is no support for basic authentication when making webservice calls via ServiceClient class. I see there is basic authentication support for proxy server but not for direct connection.
> It would be nice to have something following:
> ServiceClient client = new ServiceClient();
> client.getOptions().setUsername("username");
> client.getOptions().setPassword("password");
> Axis 1.3 have these in class org.apache.axis.client.Stub.
> -pete-

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (AXIS2-656) Support for basic authentication

Posted by "Ajith Harshana Ranabahu (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-656?page=all ]
     
Ajith Harshana Ranabahu resolved AXIS2-656:
-------------------------------------------

    Resolution: Fixed

This issue seems to be solved!

> Support for basic authentication
> --------------------------------
>
>          Key: AXIS2-656
>          URL: http://issues.apache.org/jira/browse/AXIS2-656
>      Project: Apache Axis 2.0 (Axis2)
>         Type: New Feature

>   Components: client-api
>     Reporter: Petri Hakala
>     Priority: Minor

>
> There is no support for basic authentication when making webservice calls via ServiceClient class. I see there is basic authentication support for proxy server but not for direct connection.
> It would be nice to have something following:
> ServiceClient client = new ServiceClient();
> client.getOptions().setUsername("username");
> client.getOptions().setPassword("password");
> Axis 1.3 have these in class org.apache.axis.client.Stub.
> -pete-

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (AXIS2-656) Support for basic authentication

Posted by "Tom Jordahl (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-656?page=comments#action_12378027 ] 

Tom Jordahl commented on AXIS2-656:
-----------------------------------

Lets not screw the users in the name of purity here.  setUsername() and setPasword() are pretty obvious and important attrributes on the Stub class.

+1 for including them in the Axis2 API!


> Support for basic authentication
> --------------------------------
>
>          Key: AXIS2-656
>          URL: http://issues.apache.org/jira/browse/AXIS2-656
>      Project: Apache Axis 2.0 (Axis2)
>         Type: New Feature

>   Components: client-api
>     Reporter: Petri Hakala
>     Priority: Minor

>
> There is no support for basic authentication when making webservice calls via ServiceClient class. I see there is basic authentication support for proxy server but not for direct connection.
> It would be nice to have something following:
> ServiceClient client = new ServiceClient();
> client.getOptions().setUsername("username");
> client.getOptions().setPassword("password");
> Axis 1.3 have these in class org.apache.axis.client.Stub.
> -pete-

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS2-656) Support for basic authentication

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-656?page=comments#action_12377405 ] 

Deepal Jayasinghe commented on AXIS2-656:
-----------------------------------------

nice idea , but not for 1.0  :)

> Support for basic authentication
> --------------------------------
>
>          Key: AXIS2-656
>          URL: http://issues.apache.org/jira/browse/AXIS2-656
>      Project: Apache Axis 2.0 (Axis2)
>         Type: New Feature

>   Components: client-api
>     Reporter: Petri Hakala
>     Priority: Minor

>
> There is no support for basic authentication when making webservice calls via ServiceClient class. I see there is basic authentication support for proxy server but not for direct connection.
> It would be nice to have something following:
> ServiceClient client = new ServiceClient();
> client.getOptions().setUsername("username");
> client.getOptions().setPassword("password");
> Axis 1.3 have these in class org.apache.axis.client.Stub.
> -pete-

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS2-656) Support for basic authentication

Posted by "Petri Hakala (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-656?page=comments#action_12377535 ] 

Petri Hakala commented on AXIS2-656:
------------------------------------

Ok, Sanjiva could you tell how it's possible because i don't find the way even i'm looking source codes.

> Support for basic authentication
> --------------------------------
>
>          Key: AXIS2-656
>          URL: http://issues.apache.org/jira/browse/AXIS2-656
>      Project: Apache Axis 2.0 (Axis2)
>         Type: New Feature

>   Components: client-api
>     Reporter: Petri Hakala
>     Priority: Minor

>
> There is no support for basic authentication when making webservice calls via ServiceClient class. I see there is basic authentication support for proxy server but not for direct connection.
> It would be nice to have something following:
> ServiceClient client = new ServiceClient();
> client.getOptions().setUsername("username");
> client.getOptions().setPassword("password");
> Axis 1.3 have these in class org.apache.axis.client.Stub.
> -pete-

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS2-656) Support for basic authentication

Posted by "Chad Boyd (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-656?page=comments#action_12427627 ] 
            
Chad Boyd commented on AXIS2-656:
---------------------------------

Is this fix included  in the latest 1.0 version?  I downloaded it a few days ago and it doesn't appear to be.  There is no HttpTransportProperties.BasicAuthentication class, not even listed in the online JavaDocs.

> Support for basic authentication
> --------------------------------
>
>                 Key: AXIS2-656
>                 URL: http://issues.apache.org/jira/browse/AXIS2-656
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: New Feature
>          Components: client-api
>            Reporter: Petri Hakala
>            Priority: Minor
>         Attachments: HttpBasicAuthHandler_patch.txt
>
>
> There is no support for basic authentication when making webservice calls via ServiceClient class. I see there is basic authentication support for proxy server but not for direct connection.
> It would be nice to have something following:
> ServiceClient client = new ServiceClient();
> client.getOptions().setUsername("username");
> client.getOptions().setPassword("password");
> Axis 1.3 have these in class org.apache.axis.client.Stub.
> -pete-

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Commented: (AXIS2-656) Support for basic authentication

Posted by "Petri Hakala (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-656?page=comments#action_12378392 ] 

Petri Hakala commented on AXIS2-656:
------------------------------------

I got basic authentication working in version 1.0. 

Example code:

ConfigurationContext context = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null);
ServiceClient client = new ServiceClient(context, null);
HttpClient httpClient = new HttpClient(new MultiThreadedHttpConnectionManager());
httpClient.getState().setCredentials(AuthScope.ANY, new UsernamePasswordCredentialls("username", "password"));
context.setProperty(HTTPConstants.CACHED_HTTP_CLIENT, httpClient);
client.getOptions().setProperty(HTTPConstants.REUSE_HTTP_CLIENT, new Boolean(true));

As you see, setting this is not so easy so it would be nice if there is some api setting username and password.




> Support for basic authentication
> --------------------------------
>
>          Key: AXIS2-656
>          URL: http://issues.apache.org/jira/browse/AXIS2-656
>      Project: Apache Axis 2.0 (Axis2)
>         Type: New Feature

>   Components: client-api
>     Reporter: Petri Hakala
>     Priority: Minor

>
> There is no support for basic authentication when making webservice calls via ServiceClient class. I see there is basic authentication support for proxy server but not for direct connection.
> It would be nice to have something following:
> ServiceClient client = new ServiceClient();
> client.getOptions().setUsername("username");
> client.getOptions().setPassword("password");
> Axis 1.3 have these in class org.apache.axis.client.Stub.
> -pete-

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXIS2-656) Support for basic authentication

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-656?page=all ]

Amila Chinthaka Suriarachchi updated AXIS2-656:
-----------------------------------------------

    Attachment: HttpBasicAuthHandler_patch.txt

Added a handler called HttpBasicAuthHandler to retriew the Http Basic Authentication details from the massage context and to put user name and password as seperate parameters. 

This will be a convenient feature for anyone who is going to access the user name and password.

> Support for basic authentication
> --------------------------------
>
>          Key: AXIS2-656
>          URL: http://issues.apache.org/jira/browse/AXIS2-656
>      Project: Apache Axis 2.0 (Axis2)
>         Type: New Feature

>   Components: client-api
>     Reporter: Petri Hakala
>     Priority: Minor
>  Attachments: HttpBasicAuthHandler_patch.txt
>
> There is no support for basic authentication when making webservice calls via ServiceClient class. I see there is basic authentication support for proxy server but not for direct connection.
> It would be nice to have something following:
> ServiceClient client = new ServiceClient();
> client.getOptions().setUsername("username");
> client.getOptions().setPassword("password");
> Axis 1.3 have these in class org.apache.axis.client.Stub.
> -pete-

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (AXIS2-656) Support for basic authentication

Posted by "Sanjiva Weerawarana (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-656?page=comments#action_12377421 ] 

Sanjiva Weerawarana commented on AXIS2-656:
-------------------------------------------

This is already possible using options that affect the underlying HTTP transport. 

Even beyond 1.0, IMO its not good to make Options() special case HTTP Basic Auth behavior .. depending on the underlying policy involved there can be one of many security configs that are valid. Anyway, there is rationale to the keep the simple case simple argument too :).

> Support for basic authentication
> --------------------------------
>
>          Key: AXIS2-656
>          URL: http://issues.apache.org/jira/browse/AXIS2-656
>      Project: Apache Axis 2.0 (Axis2)
>         Type: New Feature

>   Components: client-api
>     Reporter: Petri Hakala
>     Priority: Minor

>
> There is no support for basic authentication when making webservice calls via ServiceClient class. I see there is basic authentication support for proxy server but not for direct connection.
> It would be nice to have something following:
> ServiceClient client = new ServiceClient();
> client.getOptions().setUsername("username");
> client.getOptions().setPassword("password");
> Axis 1.3 have these in class org.apache.axis.client.Stub.
> -pete-

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira