Bug Tracker

Opened 15 years ago

Closed 15 years ago

#1595 closed enhancement (fixed)

ajax provides no means for passing a username and password.

Reported by: zbskii Owned by:
Priority: major Milestone: 1.2.2
Component: ajax Version: 1.2
Keywords: Cc:
Blocked by: Blocking:


XMLHttpRequest's open() can take an optional username and password as its last two parameters. JQuery provides no way to pass these in. Perhaps add username and password to the parameters $.ajax() takes?

Change History (4)

comment:1 Changed 15 years ago by john

Type: bugenhancement

comment:2 Changed 15 years ago by jgfoot

I also think that this enhancement would be very useful. By all rights, HTTP Digest authentication should be used much more often than authentication cookies: it's much more secure (especially in a non-encrypted session). A big drawback to it is that web designers don't like the dialog boxes that browsers put up demanding user names and passwords; they want to use their own HTML based forms. But, using JavaScript, you can solve this problem. The technique is documented here. It requires, however, passing the authentication username and password to the XMLHttpRequest through the .open method call. jQuery simply doesn't let you do this, even with a beforeSend function.

I think the best solution is to allow "username" and "password" to be passed to .ajax. If others agree I can submit a patch for this (it would be dead simple).

comment:3 Changed 15 years ago by cloudream

fixs in r4359

comment:4 Changed 15 years ago by davidserduke

Resolution: fixed
Status: newclosed

Fixed as cloudream said. :)

Note: See TracTickets for help on using tickets.