An AuthorizationFilter that sets a StatusCodeResult when the user is not authorized.
Initializes a new instance of AuthApiRoleRequirementFilter.
public Void AuthApiRoleRequirementFilter(auth, requiredRoles)
Name | Type | Summary |
---|---|---|
auth | AuthApiAttribute | The AuthApiAttribute that initializes this filter. |
requiredRoles | String[] | A collection of roles required to access the controller of action. |
The AuthApiAttribute that initializes this filter.
public AuthApiAttribute AuthApi { get; }
A collection of roles required to access the controller or action.
public String[] RequiredRoles { get; set; }
Process the authorization logic.
public Void OnAuthorization(context)
Name | Type | Summary |
---|---|---|
context | AuthorizationFilterContext | An AuthorizationFilterContext. |
In this document