Re: [Axis2]getting username and password
AND See my URL for how to parse the info back into strings :) -- dims On 6/22/06, Keith Hatton <[EMAIL PROTECTED]> wrote: This is Basic HTTP authentication, it's base 64 encoded - see for example section 11.1 of http://www.w3.org/Protocols/HTTP/1.0/draft-ietf-http-spec.html HTH Keith -Original Message- From: Andrew B [mailto:[EMAIL PROTECTED] Sent: 22 June 2006 16:00 To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: Re: [Axis2]getting username and password Davanum, I set the username and password on the SOAPBindingStub on the client side (with Axis 1) like this: clientStub.setUsername( ); I thought this was HTTP Basic authentication. But, when I do the following, per your suggestion: HttpServletRequest request = (HttpServletRequest)incomingContext.getProperty(Constants.HTTP_SERVLET_REQUEST); String auth = (String) request.getHeader(HTTPConstants.HEADER_AUTHORIZATION); the string I get back is: Basic V0FMTUFSVDpXQUwxMjNNQVJU which does not contain the username and password. Either I am doing something wrong, or clientStub.setUsername() is not HTTP Basic authentication. Thanks, Andrew Davanum Srinivas <[EMAIL PROTECTED]> wrote: Andrew, Are u talking about HTTP Basic authentication? You can access the HttpServletRequest as follows: HttpServletRequest request = (HttpServletRequest) msgContext.getProperty(Constants.HTTP_SERVLET_REQUEST) Then use: String auth = (String) request.getHeader(HTTPConstants.HEADER_AUTHORIZATION) to get the http header for authorization. You can then parse out the user id and password as shown here [1] -- dims [1] http://koders.com/java/fidDCB769581B5FB55A16B0B191DEB229F79B8CB9E2.aspx On 6/21/06, Andrew B wrote: > Hi, > > Does anyone know how to get the username and password that were set on the > client stub, in the service implementation class? This is another thing that > was easy in Axis 1 but so far seems to be impossible in Axis 2. I need them > to do authentication. > > Thanks, > > Andrew B > > > > Want to be your own boss? Learn how on Yahoo! Small Business. > > -- Davanum Srinivas : http://people.apache.org/~dims/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- Davanum Srinivas : http://people.apache.org/~dims/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Axis2]getting username and password
Title: Message This is Basic HTTP authentication, it's base 64 encoded - see for example section 11.1 of http://www.w3.org/Protocols/HTTP/1.0/draft-ietf-http-spec.html HTH Keith -Original Message-From: Andrew B [mailto:[EMAIL PROTECTED] Sent: 22 June 2006 16:00To: axis-user@ws.apache.org; [EMAIL PROTECTED]Subject: Re: [Axis2]getting username and passwordDavanum,I set the username and password on the SOAPBindingStub on the client side (with Axis 1) like this:clientStub.setUsername( );I thought this was HTTP Basic authentication. But, when I do the following, per your suggestion: HttpServletRequest request = (HttpServletRequest)incomingContext.getProperty(Constants.HTTP_SERVLET_REQUEST); String auth = (String) request.getHeader(HTTPConstants.HEADER_AUTHORIZATION);the string I get back is:Basic V0FMTUFSVDpXQUwxMjNNQVJUwhich does not contain the username and password. Either I am doing something wrong, or clientStub.setUsername() is not HTTP Basic authentication.Thanks,AndrewDavanum Srinivas <[EMAIL PROTECTED]> wrote: Andrew,Are u talking about HTTP Basic authentication? You can access theHttpServletRequest as follows:HttpServletRequest request = (HttpServletRequest)msgContext.getProperty(Constants.HTTP_SERVLET_REQUEST)Then use:String auth = (String) request.getHeader(HTTPConstants.HEADER_AUTHORIZATION)to get the http header for authorization. You can then parse out theuser id and password as shown here [1]-- dims[1] http://koders.com/java/fidDCB769581B5FB55A16B0B191DEB229F79B8CB9E2.aspxOn 6/21/06, Andrew B <[EMAIL PROTECTED]>wrote:> Hi,>> Does anyone know how to get the username and password that were set on the> client stub, in the service implementation class? This is another thing that> was easy in Axis 1 but so far seems to be impossible in Axis 2. I need them> to do authentication.>> Thanks,>> Andrew B>>> > Want to be your own boss? Learn how on Yahoo! Small Business.>>-- Davanum Srinivas : http://people.apache.org/~dims/-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED] __Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: [Axis2]getting username and password
Davanum,I set the username and password on the SOAPBindingStub on the client side (with Axis 1) like this:clientStub.setUsername( );I thought this was HTTP Basic authentication. But, when I do the following, per your suggestion: HttpServletRequest request = (HttpServletRequest)incomingContext.getProperty(Constants.HTTP_SERVLET_REQUEST); String auth = (String) request.getHeader(HTTPConstants.HEADER_AUTHORIZATION);the string I get back is:Basic V0FMTUFSVDpXQUwxMjNNQVJUwhich does not contain the username and password. Either I am doing something wrong, or clientStub.setUsername() is not HTTP Basic authentication.Thanks,AndrewDavanum Srinivas <[EMAIL PROTECTED]> wrote: Andrew,Are u talking about HTTP Basic authentication? You can access theHttpServletRequest as follows:HttpServletRequest request = (HttpServletRequest)msgContext.getProperty(Constants.HTTP_SERVLET_REQUEST)Then use:String auth = (String) request.getHeader(HTTPConstants.HEADER_AUTHORIZATION)to get the http header for authorization. You can then parse out theuser id and password as shown here [1]-- dims[1] http://koders.com/java/fidDCB769581B5FB55A16B0B191DEB229F79B8CB9E2.aspxOn 6/21/06, Andrew B <[EMAIL PROTECTED]> wrote:> Hi,>> Does anyone know how to get the username and password that were set on the> client stub, in the service implementation class? This is another thing that> was easy in Axis 1 but so far seems to be impossible in Axis 2. I need them> to do authentication.>> Thanks,>> Andrew B>>> > Want to be your own boss? Learn how on Yahoo! Small Business.>>-- Davanum Srinivas : http://people.apache.org/~dims/-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED] __Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: [Axis2]getting username and password
Andrew, Are u talking about HTTP Basic authentication? You can access the HttpServletRequest as follows: HttpServletRequest request = (HttpServletRequest) msgContext.getProperty(Constants.HTTP_SERVLET_REQUEST) Then use: String auth = (String) request.getHeader(HTTPConstants.HEADER_AUTHORIZATION) to get the http header for authorization. You can then parse out the user id and password as shown here [1] -- dims [1] http://koders.com/java/fidDCB769581B5FB55A16B0B191DEB229F79B8CB9E2.aspx On 6/21/06, Andrew B <[EMAIL PROTECTED]> wrote: Hi, Does anyone know how to get the username and password that were set on the client stub, in the service implementation class? This is another thing that was easy in Axis 1 but so far seems to be impossible in Axis 2. I need them to do authentication. Thanks, Andrew B Want to be your own boss? Learn how on Yahoo! Small Business. -- Davanum Srinivas : http://people.apache.org/~dims/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2]getting username and password
Hi, If you want to use WS-Security UsernameToken via Rampart module this [1] explains how to do it. Thanks, Ruchith [1] http://www.wso2.net/kb/169 On 6/22/06, Andrew B <[EMAIL PROTECTED]> wrote: Hi, Does anyone know how to get the username and password that were set on the client stub, in the service implementation class? This is another thing that was easy in Axis 1 but so far seems to be impossible in Axis 2. I need them to do authentication. Thanks, Andrew B Want to be your own boss? Learn how on Yahoo! Small Business. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Axis2]getting username and password
Hi,Does anyone know how to get the username and password that were set on the client stub, in the service implementation class? This is another thing that was easy in Axis 1 but so far seems to be impossible in Axis 2. I need them to do authentication.Thanks,Andrew B Want to be your own boss? Learn how on Yahoo! Small Business.
Re: [Axis2]getting username and password
Yes, I need to do that too (so thanks). But my question at this point was about getting username and password on the server side.robert lazarski <[EMAIL PROTECTED]> wrote: If your talking about the way call.setPassword etc worked in axis 1.x,in axis2 it is:HttpTransportProperties.BasicAuthentication basicAuthentication = new HttpTransportProperties(). new BasicAuthentication(); basicAuthentication.setUsername(userName); basicAuthentication.setPassword(password); options.setProperty(HTTPConstants.BASIC_AUTHENTICATION, basicAuthentication);HTH,Roberthttp://www.braziloutsource.com/On 6/20/06, Andrew B <[EMAIL PROTECTED]> wrote:> Hi,>> My Axis1 -> Axis2 migration continues. The issue I have now is with getting> the username and password within the Axis2 service. Are they now accessible> via MessageContext.getProperty instead of getUsername() and getPassword()?> If so, what are the names of the properties?>> Thanks>>> > Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.>>-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED] Ring'em or ping'em. Make PC-to-phone calls as low as 1¢/min with Yahoo! Messenger with Voice.
Re: [Axis2]getting username and password
If your talking about the way call.setPassword etc worked in axis 1.x, in axis2 it is: HttpTransportProperties.BasicAuthentication basicAuthentication = new HttpTransportProperties(). new BasicAuthentication(); basicAuthentication.setUsername(userName); basicAuthentication.setPassword(password); options.setProperty(HTTPConstants.BASIC_AUTHENTICATION, basicAuthentication); HTH, Robert http://www.braziloutsource.com/ On 6/20/06, Andrew B <[EMAIL PROTECTED]> wrote: Hi, My Axis1 -> Axis2 migration continues. The issue I have now is with getting the username and password within the Axis2 service. Are they now accessible via MessageContext.getProperty instead of getUsername() and getPassword()? If so, what are the names of the properties? Thanks Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Axis2]getting username and password
Hi,My Axis1 -> Axis2 migration continues. The issue I have now is with getting the username and password within the Axis2 service. Are they now accessible via MessageContext.getProperty instead of getUsername() and getPassword()? If so, what are the names of the properties?Thanks Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.