summaryrefslogtreecommitdiff
path: root/Controllers/MessageController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Controllers/MessageController.cs')
-rw-r--r--Controllers/MessageController.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/Controllers/MessageController.cs b/Controllers/MessageController.cs
new file mode 100644
index 0000000..bacaf5c
--- /dev/null
+++ b/Controllers/MessageController.cs
@@ -0,0 +1,17 @@
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Authentication.JwtBearer;
+using Microsoft.AspNetCore.Authorization;
+
+namespace IdentityAPI.Controllers {
+ [ApiController]
+ [Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)]
+ [Route("api/message")]
+ public class MessageController : ControllerBase {
+ public MessageController() {}
+
+ [HttpGet]
+ public async Task<IActionResult> Show() {
+ return Ok(new { message = "Authentication succesful" });
+ }
+ }
+} \ No newline at end of file