My Problem: Find a way to Authorize a User if need be with BasicAuth if it is set in the DB for the specific Controller/Action, before JWT Authentication is used.
I am searching for a way to call two different AuthenticationHandlers from a custom AuthenticationHandler, is this even possible or maybe I am approaching the problem wrong?
protected override Task<AuthenticateResult> HandleAuthenticateAsync()
{
//Get the Controller/Action from this.OriginalPath
//Ask the DB if the Controller/Action should be authorize using
//BasicAuth first or just use JWT
//Call the Basic or JWT Handler
}
This is the best Solution I found so far:
It is not working with WindowsAuthentication. I only get an Error saying:
But I added IISDefaults
Pls feel free to comment or Edit.