Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
18 lines (17 sloc) 436 Bytes
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace Web.Api.Controllers
{
[Authorize(Policy = "ApiUser")]
[Route("api/[controller]")]
[ApiController]
public class ProtectedController : ControllerBase
{
// GET api/protected/home
[HttpGet]
public IActionResult Home()
{
return new OkObjectResult(new { result = true });
}
}
}
You can’t perform that action at this time.