✅ How do you create custom authz/autho in ASP.NET Core?

As far as I know, on the internet there's only an implementation for JWT authentication. Yet, I need totally custom implementation that's not related to JWT at all.

I have an additional case that every static file visit should also be authenticated (the specification said so).

According to my implementation, anonymous access should be allowed. But for unknown reasons, I got empty content with 401 status code for any page and any method.

I think I'm missing something, yet I don't know what it is.
Was this page helpful?