简体   繁体   中英

Auto Login in website using windows login details via javascript? How?

I want to write javascript in my application/website so it will auto login my website using windows login details. How can i achieve this using java script? Browser can be IE or Chrome or Anyother

Javascript codes but unable to fetch password of windows for authentication. All things tried in only Javascript.

Client-side JavaScript cannot do this (and it would be awful if any website you visited could read the password you use to login to Windows!)

Authenticating with Windows login details through a browser is, as far as I know, only possible via NTLM .

You could write the server-side component of an implementation of NTLM in server-side JavaScript if you wished, but it would be more typical to use an out-of-the-box implementation such as the one built into IIS or this Apache module .

NTLM may require you to configure your browser to support it.

You can not do this with JavaScript alone, you need to do this with some server side solution such as Kerberos in combination with your Active Directory server (or use an older technique such as NTLM). I'm not sure if there are newer/better ways to achieve this than using Kerberos. Any solution will very very likely require configuration in your browser and not all browsers will support all approaches.

Some details can be found here: https://serverfault.com/questions/254813/why-use-kerberos-instead-of-ntlm-in-iis and https://www.roguelynn.com/words/explain-like-im-5-kerberos/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM