I have a program in which a user base is held in Active Directory. It uses ADFS as the go-between from the AD and my program. I use a C# Security Token to get a valid token from ADFS once a person attempts to log in.
If the login attempt fails for ANY reason, I receive an error 3242.
{"ID3242: The security token could not be authenticated or authorized."}
This happens when I enter a bad username, or a bad password, or the password has expired in Active Directory.
If a user fails to log in, I want to be able to give them a better error message as to WHY they weren't able to. It would be ideal to tell them that their password is expired (if it is), and perhaps provide instructions on how to reset it, and etc.
So my question to you all is this: While Using a C# SecurityToken Object, how can I provide a user with better error messages upon a log in fail?
I am very new to these concepts, so I apologize in advance for skimpy details. This post is me putting my feelers out to see if anyone can point me in a good direction. Thank you in advance for your time and responses.