using System.Linq;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace Website
{
  public class AdminController : Controller
  {
    [Authorize(Policy = "IsAdmin")]
    // [Authorize(Roles = "Administrator")]
    public IActionResult Index()
    {
      return Json(new
      {
        Name = User.Identity.Name,
        ClaimsCount = User.Claims.Count()
      });
    }
  }
}