26 lines
487 B
C#
26 lines
487 B
C#
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace HanyadikHetVan.Controllers
|
|
{
|
|
[Route("api/test")]
|
|
[ApiController]
|
|
public class TestController : ControllerBase
|
|
{
|
|
[HttpGet("unprotected")]
|
|
public string Unprotected()
|
|
{
|
|
|
|
return "Unprotected";
|
|
}
|
|
|
|
[Authorize]
|
|
[HttpGet("protected")]
|
|
public string Protected()
|
|
{
|
|
|
|
return "Protected";
|
|
}
|
|
}
|
|
}
|