In our application we support both users authorized with NTLM in a certain intranet domain, and users authorized with a standard login/password pair which we store in our database. When a new user registers, it would be nice to know if he has NTLM credentials and just prompt him to use these, instead of a generic registration form.
I.e. something like (in pseudocode):
if user.has_ntlm_credentials:
ask ("You are known as {domain}\{username}, register in the application?")
else:
show_login_password_registration_form ()
If I make the page send back 401 HTTP code and ask for NTLM notification, I will get the above if the user is authenticated already (e.g. comes from that intranet and uses Windows). But for every other user browser will show ugly authentication dialog, which looks ridiculously out of place on a registration page.
So, question is, is it possible to ask browser for already available NTLM credentials, if any?