Here's the flow I'm looking for for authentication:
- Attempt to pull in the user's name from windows authentication
- If that failed (user is external to network), use BASIC authentication to get the username/password.
- Check the username/password against the SQL database. If windows, password isn't required, if BASIC authentication and password is incorrect, prompt again
- Create the Identity object with the user name, and populate the user's roles via another SQL database call
This would need to be used for multiple applications.
What would be the best method of implementing this? Creating a HTTPModule? If so, what do I need to keep in mind (security, virtual directory setup, etc)