From 4c1a20746abc3354d67ffd7ef65e8639e70cd63a Mon Sep 17 00:00:00 2001 From: 杨宇千 Date: Sun, 20 Oct 2019 16:47:17 +0800 Subject: ... --- .../Controllers/Testing/TestingAuthController.cs | 32 ++++++++++++++++++++++ Timeline/Controllers/UserTestController.cs | 32 ---------------------- 2 files changed, 32 insertions(+), 32 deletions(-) create mode 100644 Timeline/Controllers/Testing/TestingAuthController.cs delete mode 100644 Timeline/Controllers/UserTestController.cs (limited to 'Timeline/Controllers') 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(); + } + } +} diff --git a/Timeline/Controllers/UserTestController.cs b/Timeline/Controllers/UserTestController.cs deleted file mode 100644 index 2a5f36a1..00000000 --- a/Timeline/Controllers/UserTestController.cs +++ /dev/null @@ -1,32 +0,0 @@ -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Mvc; -using Timeline.Authenticate; - -namespace Timeline.Controllers -{ - [Route("Test/User")] - [ApiController] - public class UserTestController : 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(); - } - } -} -- cgit v1.2.3