From b3eecbff77187f0515c07609e4b7391be72d7a19 Mon Sep 17 00:00:00 2001 From: Tudor Stanciu Date: Sat, 13 Nov 2021 21:20:12 +0200 Subject: [PATCH] SystemController --- Directory.Build.props | 2 +- .../Controllers/SystemController.cs | 33 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 IdentityServer.Api/Controllers/SystemController.cs diff --git a/Directory.Build.props b/Directory.Build.props index 20237be..79eeeb1 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - 1.0.0 + 1.0.1 Tudor Stanciu STA IdentityServer diff --git a/IdentityServer.Api/Controllers/SystemController.cs b/IdentityServer.Api/Controllers/SystemController.cs new file mode 100644 index 0000000..486bc55 --- /dev/null +++ b/IdentityServer.Api/Controllers/SystemController.cs @@ -0,0 +1,33 @@ +using MediatR; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using System; + +namespace IdentityServer.Api.Controllers +{ + [ApiController] + [Route("system")] + public class SystemController : ControllerBase + { + private readonly IMediator _mediator; + + public SystemController(IMediator mediator) + { + _mediator = mediator; + } + + [AllowAnonymous] + [HttpGet("ping")] + public IActionResult Ping() + { + return Ok($"Ping success. System datetime: {DateTime.Now}"); + } + + /* + Methods: + /version + /burn-token + /burn-all-tokens + */ + } +}