Closed Bug 122495 Opened 23 years ago Closed 7 years ago

xml-rpc needs authentication

Categories

(Core :: XML, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: samuel, Assigned: samuel)

References

Details

Attachments

(2 obsolete files)

xml-rpc currently doesn't work well when you need a username and password to
access the server.  The API needs some way to specify the username and password
to be used.
I added a function called "setAuthentication".
I also removed some unused code and fixed several strict warnings.
Attached patch new patch (obsolete) — Splinter Review
The last patch was not finished.
Attachment #66996 - Attachment is obsolete: true
looking for review
Assignee: heikki → samuel
Keywords: patch
Status: NEW → ASSIGNED
mj, do you think you could review this?
Comment on attachment 66997 [details] [diff] [review]
new patch

Looks clean to me, r=rginda
Attachment #66997 - Flags: review+
Comment on attachment 66997 [details] [diff] [review]
new patch

>Index: extensions/xml-rpc/src/nsXmlRpcClient.js

>+    // nsIInterfaceRequester interface
>+    getInterface: function(iid, result){
>+        if (iid.equals(Components.interfaces.nsIAuthPrompt)){
>+              return this;
>+        }

nit: indentation

otherwise sr=darin
Attachment #66997 - Flags: superreview+
The code on the whole looks good to me. I do have some questions though:

- How does the user of the component clear the authentication credetials? There 
may be a need for this; there is a need to clear browser authentication in 
general, for example the Zope management interface has to force this on the 
server side as no browser has an UI for it. Having a method to set credentials, 
I'd expect a companion method to clear them too.

- How does the user of the component get notified if the authentication failed?
I'm open to suggestions.  I just did this because it needed to be done.  If you
have ideas on a better API, let me know and I'll implement it.
one solution would be to use the password manager for storing all passwords. 
this would allow users to make use of the password manager UI to delete these.

see nsIPasswordManager.idl in netwerk/base/public
i should have added: if you have specific question regarding the password
manager, ask morse.
Hmm, I think users of the XML-RPC compnent may want to add a layer in between 
the password manager and the component. Just add a clearAuthentication method, 
which sets this._useAuth to false.

As for authentication error problems; just pass back an error message through 
nsIXmlRpcClientListener.onError().
Blocks: 124861
I checked in the current patch as some people have immediate need of it. I will
work on adding the other functionality as I have time.
No longer blocks: 124861
Keywords: patch
It wasn't possible just to check in the fix for removing the newline on POSTs? 

I indeed see that your patch did various clean-ups besides the authentication code; it is generally a good idea to seperate developments like these into seperate checkins.
I agree with Martijn Pieters here. Especially the checkin log message "added
method to set authentication for xml-rpc" did not suggest that the checkin fixed
the additional newline problem (bug 124861). But it's nice to see that this code
is actively maintained. :-)
The patch has maybe grown stale, but it still has review and super-review. Can
someone do a status update?
Keywords: mozilla1.0, patch
Comment on attachment 66997 [details] [diff] [review]
new patch

Sorry, see comment 12.	This patch was checked in, but I'm leaving the bug open
in hopes of making it better.
Attachment #66997 - Attachment is obsolete: true
Keywords: mozilla1.0, patch
QA Contact: petersen → rakeshmishra
QA Contact: rakeshmishra → ashishbhatt
Depends on: 197087
Anyone have any comments on whether bug 197087 being fixed makes this one irrelevant?
QA Contact: ashshbhatt → xml
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: