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.
abp/modules/openiddict/app/OpenIddict.Demo.Server/Controllers/ClaimsController.cs

17 lines
357 B

using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace OpenIddict.Demo.Server.Controllers;
[ApiController]
[Authorize]
[Route("api/claims")]
public class ClaimsController : Controller
{
[HttpGet]
public JsonResult Get()
{
return Json(User.Claims.Select(x => new {Type = x.Type, Value = x.Value}));
}
}