add identity server

This commit is contained in:
Michele 2020-11-07 11:45:16 +00:00
parent e96a3ef09f
commit 585ac7c672
12 changed files with 297 additions and 2 deletions

View file

@ -0,0 +1,18 @@
using System.Linq;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authorization;
namespace Sledgemapper.Api.Controllers
{
[Route("identity")]
[Authorize]
public class IdentityController : ControllerBase
{
[HttpGet]
public IActionResult Get()
{
return new JsonResult(from c in User.Claims select new { c.Type, c.Value });
}
}
}