This looks like just what I need. If I just enable basic authentication it does what I want but if I then try something like
services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
.AddCookie(o => o.LoginPath = new PathString("/login"))
.AddBasicAuthentication(...
then it always uses cookie authentication, if I switch the default scheme to basic then it always tries to use basic authentication. I'd like to use cookie authentication by default, but switch to basic if the basic auth header comes through with the http request. Am I missing something?
Hi
This looks like just what I need. If I just enable basic authentication it does what I want but if I then try something like
then it always uses cookie authentication, if I switch the default scheme to basic then it always tries to use basic authentication. I'd like to use cookie authentication by default, but switch to basic if the basic auth header comes through with the http request. Am I missing something?