public function validateAuthParams(array $authParams, array $acceptableParams)
    {
        foreach ($authParams as $paramName=>$paramValue) {

            if (!isset($acceptableParams[$paramName])) {
                throw new \Exception(get_class().": Unacceptable authParam: {$paramName}");
            }

            // Try resolving to class method first, then try resolving to global function
            if (method_exists($this, $acceptableParams[$paramName])) {
                $validationPassed = $this->$acceptableParams[$paramName]($paramValue);
            }
            elseif (function_exists($acceptableParams[$paramName])) {
                $validationPassed = $acceptableParams[$paramName]($paramValue);
            }
            else {
                throw new \Exception(get_class().": authParam validator not found: {$paramName}");
            }

            if (!$validationPassed) {
                throw new \Exception(get_class().": Failed authParam validation: {$paramName}");
            }
        }
    }