If an action within a controller with [Authorize] should be accessible without authorization, you can use the [_________] attribute.
- [AllowAnonymous]
- [Unsecured]
- [IgnoreAuthorization]
- [PublicAccess]
If an action within a controller with [Authorize] should be accessible without authorization, you can use the [AllowAnonymous] attribute. This attribute allows you to exempt specific actions from the global authorization policy, making them accessible to all users, even if other parts of the controller require authorization.
Loading...
Related Quiz
- Your company's security policy dictates that users must change their passwords every 60 days. How would you implement this requirement using ASP.NET Core Identity?
- The @ViewData object is a type of _________, allowing you to pass data from the controller to the view.
- What is the primary role of Entity Framework Core in ASP.NET Core applications?
- For developers using Visual Studio, the _________ window provides a REPL environment for C# scripting.
- After a user logs into your application, you want to display a personalized greeting like "Welcome, [Username]!". How can you fetch the username of the currently logged-in user in ASP.NET Core?