mirror of https://github.com/abpframework/abp.git
5 changed files with 50 additions and 2 deletions
@ -0,0 +1,16 @@ |
|||
using System.Linq; |
|||
using Microsoft.AspNetCore.Authorization; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
|
|||
namespace AbpDesk.Web.Mvc.Controllers |
|||
{ |
|||
public class AuthTestController : AbpController |
|||
{ |
|||
[Authorize(Policy = "RequirePhoneNumber")] |
|||
public ContentResult PhoneNumberIsRequired() |
|||
{ |
|||
return Content("OK: " + User.Claims.First(c => c.Type == "phone_number")?.Value); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue