OnAuthorization is called upon authorization and OnActionExecuting is called before the action method is called. Authorization will be performed before the action is completed. This gives you the opportunity to check whether the user is allowed to perform this action.
source share