I'm doing some research about authentication via Active Directory for internal application.
Application is divided in two parts - front-end in Angular 2, and back-end in Spring. I would like to add windows authentication to it to avoid providing credentials when you are already logged in, but i can't fully understand how possibly server knows the credentials of which user to compare with those stored in Active Directory.
For example let's assume that I've logged into windows, my data are sent to Active Directory.
Now I'm heading to website, which i would like to automatically authenticate me with http request sent to rest api.
Rest server invokes some logic connected with authentication with Active Directory, and after success rest api sends token back to Angular. But the thing I'm missing is how server knows which credentials compare to know if user exists in AD.
Should i somehow use angular to gain acces of user credentials stored in windows through browser? Or I'm missing something important here.