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