aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Controllers/Testing/TestingAuthController.cs
blob: 4d3b3ec79877972a12da6196040de6b41b610658 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Timeline.Auth;

namespace Timeline.Controllers.Testing
{
    [Route("testing/auth")]
    [ApiController]
    public class TestingAuthController : Controller
    {
        [HttpGet("[action]")]
        [Authorize]
        public ActionResult Authorize()
        {
            return Ok();
        }

        [HttpGet("[action]")]
        [UserAuthorize]
        public new ActionResult User()
        {
            return Ok();
        }

        [HttpGet("[action]")]
        [AdminAuthorize]
        public ActionResult Admin()
        {
            return Ok();
        }
    }
}