-2

My requirement: Consider a client server web application. We have an LDAP server to authenticate.

When user logins to the application from a browser, we need to retrieve the current windows system user ID and password and then pass it to LDAP server for authentication.

Question: Where in windows does the windows system username and password is stored? How can we retrieve the user ID and the password using Ember. Please note that its not the web application userID and password, its the windows system userID and password.

Pratim Singha
  • 569
  • 2
  • 10
  • 33
  • Possible duplicate of [How to build LDAP integration for my web app?](https://stackoverflow.com/questions/761966/how-to-build-ldap-integration-for-my-web-app) – Gennady Dogaev Jan 23 '18 at 15:51
  • Also, [google is your friend](https://www.google.com.ua/search?q=ldap+authentication+in+the+web&oq=ldap+authentication+in+the+web&aqs=chrome..69i57j0l5.7743j0j7&client=ubuntu&sourceid=chrome&ie=UTF-8) – Gennady Dogaev Jan 23 '18 at 15:54

2 Answers2

1

Retrieving system params like the current user in JavaScript would be a security risk. Imagine an arbitrary webpage you are visiting could read out such sensitive data and send it to any server.

JavaScripts context is the HTML doc. Maybe you could request the informations from your server via AJAX(by ip-address, email i.e.). Or you could provide a login. To avoid the problem of numerous logins you could increase your session expire dates.

Last note: I'm not familiar to Windows, but I think their could be one solution using an ActiveXObject on Windows. But then it will just work on Windows using Internet Explorer. I would not recommend this.

wuarmin
  • 3,274
  • 3
  • 18
  • 31
0

This is not really possible. You have to do the authentication over HTTP. Here you can use windows (Negotiate) authentication or NTLM, and then the server knows about the Windows User. Next your JS-App needs to ask the Server about this user. However this is not really related to ember, but more about what web server software you're using.

Lux
  • 17,835
  • 5
  • 43
  • 73