You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
492 B
20 lines
492 B
// Copyright (c) Duende Software. All rights reserved.
|
|
// See LICENSE in the project root for license information.
|
|
|
|
|
|
using System.Linq;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
namespace Api.Controllers
|
|
{
|
|
[Route("identity")]
|
|
[Authorize]
|
|
public class IdentityController : ControllerBase
|
|
{
|
|
public IActionResult Get()
|
|
{
|
|
return new JsonResult(from c in User.Claims select new { c.Type, c.Value });
|
|
}
|
|
}
|
|
}
|