329
CHAPTER 8 | Make secure .NET Microservices and Web Applications
[Authorize]
public
ActionResult
Logout
()
{
}
}
By default, adding an Authorize attribute without parameters will limit access to authenticated users
for that controller or action. To further restrict an API to be available for only
specific users, the
attribute can be expanded to specify required roles or policies that users must satisfy.
Dostları ilə paylaş: