final protected function onAuth()
    {
        $authService = $this->getAuthService();

        $this->authManager->setAuthService($authService);

        if ($this->authActive === true) {
            if ($authService->isLoggedIn()) {
                $this->onSuccess();
            } else {
                $this->onFailure();
            }
        }

        // Now handle RBRAC if present
        if ($this->hasRbacRules()) {
            // Check if provided user has enough privileges
            if (!$this->hasRight($authService->getRole())) {
                $this->onNoRights();
            }
        }
    }