Bug Tracker

Modify

Ticket #1595 (closed enhancement: fixed)

Opened 6 years ago

Last modified 5 years ago

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:1 Changed 6 years ago by john

  • Type changed from bug to enhancement

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).

comment:3 Changed 5 years ago by cloudream

fixs in r4359

comment:4 Changed 5 years ago by davidserduke

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from 1.2.1 to 1.2.2

Fixed as cloudream said. :)

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.