aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Controllers/Testing
diff options
context:
space:
mode:
Diffstat (limited to 'BackEnd/Timeline/Controllers/Testing')
-rw-r--r--BackEnd/Timeline/Controllers/Testing/TestingAuthController.cs32
1 files changed, 32 insertions, 0 deletions
diff --git a/BackEnd/Timeline/Controllers/Testing/TestingAuthController.cs b/BackEnd/Timeline/Controllers/Testing/TestingAuthController.cs
new file mode 100644
index 00000000..4d3b3ec7
--- /dev/null
+++ b/BackEnd/Timeline/Controllers/Testing/TestingAuthController.cs
@@ -0,0 +1,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();
+ }
+ }
+}