blob: bacaf5c24f639c524cfe33ca2dd3648a50e2de79 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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" });
}
}
}
|