Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
SOAP Security: HTTP-Basic authentication
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Eugene Prokopiev  
View profile  
 More options Jan 25 2005, 1:48 am
Newsgroups: netscape.public.mozilla.xml
From: Eugene Prokopiev <prokop...@stc.donpac.ru>
Date: Tue, 25 Jan 2005 09:48:29 +0300
Local: Tues, Jan 25 2005 1:48 am
Subject: SOAP Security: HTTP-Basic authentication
Hi,

How can I create SOAP Call for service protected by servlet container
with HTTP-Basic authentication?

I can use this code with Axis (http://ws.apache.org/axis/):

Service service = new Service();
Call call = (Call)service.createCall();
call.setUsername(username);
call.setPassword(password);

How can I do it with Mozilla JavaScript?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Martin Honnen  
View profile  
 More options Jan 25 2005, 11:24 am
Newsgroups: netscape.public.mozilla.xml
From: Martin Honnen <mahotr...@yahoo.de>
Date: Tue, 25 Jan 2005 17:24:26 +0100
Local: Tues, Jan 25 2005 11:24 am
Subject: Re: SOAP Security: HTTP-Basic authentication

Eugene Prokopiev wrote:
> How can I create SOAP Call for service protected by servlet container
> with HTTP-Basic authentication?

> I can use this code with Axis (http://ws.apache.org/axis/):

> Service service = new Service();
> Call call = (Call)service.createCall();
> call.setUsername(username);
> call.setPassword(password);

> How can I do it with Mozilla JavaScript?

I am not sure you can do that with JavaScript but perhaps if you use
script to access a web service and authentication is required then
Mozilla will simply pop up its authentication dialog as normal with
other resources requiring authentication.
Have you tried that, simply calling the service with script? What
happens then, do you get an error dialog or an error in the JavaScript
console?

--

        Martin Honnen
        http://JavaScript.FAQTs.com/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eugene Prokopiev  
View profile  
 More options Jan 27 2005, 2:07 am
Newsgroups: netscape.public.mozilla.xml
From: Eugene Prokopiev <prokop...@stc.donpac.ru>
Date: Thu, 27 Jan 2005 10:07:36 +0300
Local: Thurs, Jan 27 2005 2:07 am
Subject: Re: SOAP Security: HTTP-Basic authentication

I don't know, I don't tried it yet.

I think HTTP-Basic authentication use custom HTTP headers in SOAP
messages, so can I modify it any way except working with XmlHttpRequest?

Pop up dialog is suitable for me.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eugene Prokopiev  
View profile  
 More options Jan 27 2005, 3:18 am
Newsgroups: netscape.public.mozilla.xml
From: Eugene Prokopiev <prokop...@stc.donpac.ru>
Date: Thu, 27 Jan 2005 11:18:27 +0300
Local: Thurs, Jan 27 2005 3:18 am
Subject: Re: SOAP Security: HTTP-Basic authentication

> Pop up dialog is suitable for me.

sorry, it's _not_ suitable for me

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Martin Honnen  
View profile  
 More options Feb 2 2005, 9:42 am
Newsgroups: netscape.public.mozilla.xml
From: Martin Honnen <mahotr...@yahoo.de>
Date: Wed, 02 Feb 2005 15:42:20 +0100
Local: Wed, Feb 2 2005 9:42 am
Subject: Re: SOAP Security: HTTP-Basic authentication

Eugene Prokopiev wrote:
>> Pop up dialog is suitable for me.

> sorry, it's _not_ suitable for me

I am not sure the SOAP API has any way to provide username and password
for basic authentication but for me here with Firefox 1.0 it works to
use XMLHttpRequest first to make a HTTP HEAD request sending the
credentials (the open method has the fourth and fifth argument for that)
and then to make the SOAP call e.g.

var soapCall = new SOAPCall();
soapCall.transportURI = 'http://example.org/services/service.asmx';
soapCall.encode(...);

var httpRequest = new XMLHttpRequest();
httpRequest.open('GET', soapCall.transportURI, false, 'username',
'password');
httpRequest.send(null);

if (httpRequest.status == 200) {
   var soapResponse = soapCall.invoke();
   ...

}

That way the basic HTTP authentication happens and for the browser
session Mozilla remembers that so that the SOAP calls then work.

--

        Martin Honnen
        http://JavaScript.FAQTs.com/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hiran Chaudhuri  
View profile  
 More options Feb 2 2005, 5:09 pm
Newsgroups: netscape.public.mozilla.xml
From: "Hiran Chaudhuri" <hiran.chaudhuri@_at_web_dot.de>
Date: Wed, 2 Feb 2005 23:09:51 +0100
Local: Wed, Feb 2 2005 5:09 pm
Subject: Re: SOAP Security: HTTP-Basic authentication

> I am not sure the SOAP API has any way to provide username and password
> for basic authentication but for me here with Firefox 1.0 it works to
> use XMLHttpRequest first to make a HTTP HEAD request sending the
> credentials (the open method has the fourth and fifth argument for that)
> and then to make the SOAP call e.g.

How about submitting username and password together with the URL?

var soapCall = new SOAPCall();
soapCall.transportURI = 'http://username:passw...@example.org/services/service.asmx';
soapCall.encode(...);

I know the security is not too good.
But then the URI need not be hardcoded, it can be created on the client. And next the request better use https to encrypt the whole stream....

Hiran


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Martin Honnen  
View profile  
 More options Feb 3 2005, 9:15 am
Newsgroups: netscape.public.mozilla.xml
From: Martin Honnen <mahotr...@yahoo.de>
Date: Thu, 03 Feb 2005 15:15:25 +0100
Local: Thurs, Feb 3 2005 9:15 am
Subject: Re: SOAP Security: HTTP-Basic authentication

Hiran Chaudhuri wrote:
> How about submitting username and password together with the URL?

> var soapCall = new SOAPCall();
> soapCall.transportURI = 'http://username:passw...@example.org/services/service.asmx';
> soapCall.encode(...);

> I know the security is not too good.

I have tried that here with Firefox 1.0 and it works too.

--

        Martin Honnen
        http://JavaScript.FAQTs.com/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eugene Prokopiev  
View profile  
 More options Feb 7 2005, 1:15 am
Newsgroups: netscape.public.mozilla.xml
From: Eugene Prokopiev <prokop...@stc.donpac.ru>
Date: Mon, 07 Feb 2005 09:15:43 +0300
Local: Mon, Feb 7 2005 1:15 am
Subject: Re: SOAP Security: HTTP-Basic authentication

> That way the basic HTTP authentication happens and for the browser
> session Mozilla remembers that so that the SOAP calls then work.

Thanks. It's fine. Can I close session and authenticate as another user
without closing Mozilla?

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google