idunno.Authentication icon indicating copy to clipboard operation
idunno.Authentication copied to clipboard

Add the ability to override the SuppressWWWAuthenticateHeader based on path.

Open joursler-Sunset opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Generally I want SuppressWWWAuthenticateHeader set to true, however for a Library UI (Hangfire) I want to use Basic Auth and need to trigger the www-authenticate header for basic auth on a specific path.

Describe the feature you would like add a configuration option and associated code to BasicAuthenticationOptions for SuppressWWWAuthenticateHeaderPathOverride and BasicAuthenticationHandler.

Additional context

joursler-Sunset avatar Dec 18 '24 17:12 joursler-Sunset

You should be able to do this already with sub applications,

app.UseEndpoints(endpoints =>
{
    var subApp = app.New();
    subApp.UseMiddleware<FooMiddleware>();
    endpoints.Map("/foo", subApp.Build());
}

This ought to allow you to setup different configurations - does that not work?

blowdart avatar Dec 19 '24 23:12 blowdart

Its not something I have tried. Ill give that a go and see how it works out. (also didn't even know about sub apps).

The library at issue is Hangfire so we will see.

joursler-Sunset avatar Jan 02 '25 22:01 joursler-Sunset