List Info

Thread: Commented: (XMLRPC-102) Basic username and password don't get sent to the Servlet




Commented: (XMLRPC-102) Basic username and password don't get sent to the Servlet
user name
2006-08-18 19:15:18
    [ http://issues.apache.org/jira/brows
e/XMLRPC-102?page=comments#action_12429093 ] 
            
Jochen Wiedmann commented on XMLRPC-102:
----------------------------------------

Having worked on the Authorization issues yesterday, I
presume that this bug is in fact a duplicate of XMLRPC-104.
In other words, the missing credentials are caused by the
NullPointerException in HttpUtils.parseAuthorization().


> Basic username and password don't get sent to the
Servlet
>
---------------------------------------------------------
>
>                 Key: XMLRPC-102
>                 URL: http:
//issues.apache.org/jira/browse/XMLRPC-102
>             Project: XML-RPC
>          Issue Type: Bug
>          Components: Source
>    Affects Versions: 3.0rc1
>         Environment: Tested issue on Ubutu Linux Dapper
Drake x86 and OS X 10.4.7 on a MacBook Pro
>            Reporter: Dave Pederson
>            Priority: Minor
>
> Username and password authentication are not working
with the WebServer class.  An example is to extend
PropertyHandlerMapping.AuthenticationHandler and implement
(here is just an example) the following method:
> public boolean isAuthorized(XmlRpcRequest pRequest)
> {
>     if (pRequest.getConfig() instanceof RequestData)
>     {
>         RequestData data = (RequestData)
pRequest.getConfig();
>         System.out.println("username =
"+data.getBasicUserName());
>         System.out.println("password =
"+data.getBasicPassword());
>     }
> }
> This class is then instantiated and set as the
authentication handler in the WebServer's
PropertyHandlerMapping when the WebServer is created and
started.  Then, on the client side, I set the username and
password in the configuration as seen below:
> XmlRpcClientConfigImpl config = new
XmlRpcClientConfigImpl();
> config.setServerUrl("http://127.0.0.1:8080/xm
lrpc");
> config.setBasicUserName("adst-test");
> config.setBasicPassword("adst-test#!");
> XmlRpcClient client = new XmlRpcClient();
> client.setConfig(config);
> Object[] params = new Object[]{new Integer(1), new
HashMap()};
> Map result = (Map)
client.execute("AssignmentService.getAssignees",
params);
> The remote method call executes successfully, however,
the System.out statements always reveals the following on
the server:
> username = null
> password = null

-- 
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.atl
assian.com/software/jira

        
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )