.net - Handle www-authentication request using ajax? -
Is it possible to use the AJAX pass passwords for a webserver that requests www-authentication?
I want to log on to a website which is Net Bsic uses www-authentication, and pass credentials using AJAX. On the server with the browser, the browser prompts the user with an authentication / login window.
The HTML header includes:
WWW-certified: original realm = "hosting.xp" Microsoft PartpointTam Services: 6.0.2.6568 by X-Power: ASP I want to use the 'behind the scenes' site by calling from an AJAX object, but I'm not sure how http is the header that requests authentication. I have to log in to a specific user (cookie set) to call AJAX, so that user users will later be logged into the site and 'already'.
Can I be done in the way described here?
You can pass the username and password in the URL such as:
Here are examples of jQuery:
& lt; Script type = "text / javascript" src = "http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {$ ('a.logMeIn'). Click (function () {$ .get ('http: // username: password@example.com/secure', null, Function response) {warning (reaction);});});}); & Lt; / Script & gt; & Lt; A href = "#" class = "logMeIn" & gt; Sign me up! & Lt; / A & gt;
Comments
Post a Comment