I know current Authorize supports elements like below:
[Authorize(Roles = "XX", Policy = "XX")]
I want to add more elements enums like below:
[Authorize(Roles = "XX", Policy = "XX", Permission="Read")]
How to implement my own Authorize attribute and add new function for Permission? I have tried to inherit AuthorizeAttribute like below, but I do not know how to invoke Permission validate.
public class CustomAuthorizeAttribute : AuthorizeAttribute
{
public string Groups { get; set; }
}
Any help would be appreciated