Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Authenticate Windows Authentication using Javascript

I have to transfer my client from one website to another website. This happens in client side. In this 2nd website, its using windows basic authentication system. So It popups the login window. I need to omit this Popup window and authenticate my client on 2nd website using javascript and then redirect him to 2nd website. There is no security issue even I put credentials in javascript file since this whole system is running in Intranet. So How to authenticate client on 2nd website ?

I found this thread How can I pass windows authentication to webservice using jQuery?

But it does not work. When I look the request header of 2nd url, It does not contain the Authorization tag.

like image 877
Sency Avatar asked Jul 19 '11 13:07

Sency


People also ask

How do I use JavaScript authentication?

To setup Authentication, the user needs to configure OAuth 2.0 ID in JavaScript and the backend code. 5. JavaScript application uses client ID to obtain the Google ID token from OAuth 2.0 server and send ID in the request.

How do I authenticate my Windows?

On the taskbar, click Start, and then click Control Panel. In Control Panel, click Programs and Features, and then click Turn Windows Features on or off. Expand Internet Information Services, then World Wide Web Services, then Security. Select Windows Authentication, and then click OK.

How do I implement Windows Authentication in Web API?

To enable windows authentication set ( ) in “applicationhost. config”file which resides at Project root directory “. vs\config”, this folder is hidden you must enable the show all hidden files and folder option.

Can Chrome use Windows Authentication?

Windows Integrated Authentication is enabled by default for Internet Explorer but not Google Chrome or Mozilla Firefox.


1 Answers

If this is Windows Authentication, then the response won't be prompting the client for credentials, the browser will be attempting to pass the credentials itself already. It does not quite work the way HTTP does -- you actually need to configure the browser itself to to have it send the authorization based on Windows credentials.

It does not appear that there is a simple JS solution to this at all.

like image 89
cwallenpoole Avatar answered Sep 21 '22 13:09

cwallenpoole