Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Disable user authentication for a controller

$
0
0

Hi,

I want to disable user authentication for a controller. But I still need to authentication (bearer token should be valid) for this controller. And of course need authentication and user roles for other controllers. How can I disable role base auth for an controller/action?

My startup class contains:

public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
app.UseAuthentication(); app.UseAuthorization(); app.UseRoleAbility();
...
}


And my controller contains 

[Authorize]

attribute.


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>