add identity server
This commit is contained in:
parent
e96a3ef09f
commit
585ac7c672
12 changed files with 297 additions and 2 deletions
18
Sledgemapper.Api/Controllers/IdentityController.cs
Normal file
18
Sledgemapper.Api/Controllers/IdentityController.cs
Normal 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 });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue