I got a simple MVC Website with Windows Authentication and an Oracle Database.
I want to provide a nearly "SSO" feeling for the user. Meaning the flow would be something like this:
- User browses to the website
- Windows Authentication happens
- App checks for Username and Password for this AD User
- If found, check if valid
- If valid, continue
- If NOT valid, Ask for Username and Password
- Save them and continue
- If NOT found, Ask for Username and Password
- Check till valid
- Save them and continue
- Check till valid
- If found, check if valid
First problem is, that I don't know where to store the Username and Password for the Database connection.
Second problem is, that I don't know where to check the information.
As far as I can imagine there are two solutions for the first problem:
- storing the Data in the Active Directory (using custom attributes)
- storing the Data in an external file (text, db)
I can't use the Oracle DB itself, because I would need an User to query the User Information, which doesn't make sense in that case.
The second problem is actually my main concern
Where would I put the logic of checking the Username and Password ?
I looked on the Web and found the following options:
- Using a global Action Filter (How would the redirect work? Or should one just use modals for that?)
- Using a Middleware (Not sure where to get
app
though)