hanyadikhetvan-dotnethf/HanyadikHetVan/Controllers/TestController.cs

30 lines
574 B
C#
Raw Normal View History

2021-05-03 01:30:06 +02:00
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace HanyadikHetVan.Controllers
{
[Route("api/test")]
[ApiController]
public class TestController : ControllerBase
{
[HttpGet("unprotected")]
public string Unprotected()
{
return "Geci";
}
[Authorize]
[HttpGet("protected")]
public string Protected()
{
return "Gecijo";
}
}
}