Ticket #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: | ||
| Blocking: | Blocked by: |
Description
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
comment:2 Changed 5 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).
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
