diff --git a/Nbic.References/Controllers/PingController.cs b/Nbic.References/Controllers/PingController.cs new file mode 100644 index 0000000..1a8d71b --- /dev/null +++ b/Nbic.References/Controllers/PingController.cs @@ -0,0 +1,27 @@ +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Swashbuckle.AspNetCore.Annotations; + +namespace Nbic.References.Controllers +{ + [Route("api/[controller]")] + [ApiController] + [SwaggerTag("Check status and authentication")] + public class PingController : ControllerBase + { + [HttpGet] + [Route("Ping")] + public string Ping() + { + return "Ok!"; + } + + [HttpGet] + [Authorize("WriteAccess")] + [Route("AuthorisedPing")] + public string AuthorisedPing() + { + return "Ok!"; + } + } +}