It is the method that effectively makes the decision whether the user is authorized or not to access a given context. Here we check the roles, the normal rules, the special rules, and so on. The return is just a boolean.
It is a method that performs additional actions that have to do with the verification of the authorization itself, but it is not exactly the verification of the authorization. For example, to put conditions in place to verify whether the verification of the authorisation itself should be done or not.
Unlike AuthorizeCore
, does not return output (void
). The difference between the two is basically in the scope of each.
And there’s a way to capture the controller via authorizeCore’s Httpcontextbase ?
– Rod
@Rod Here’s how to get the controller, or controller name: http://stackoverflow.com/a/9022179/857807
– dcastro
@dcastro much Gambi to get the controller in this link, I will use Onauthorization even, worth :D
– Rod