/** * _matchCredentials * * @param mixed $token The token to match * @param mixed $authInfo The authentication info to match the token with * * @access private * @return void * @throws Exception */ private function _matchCredentials($token, $authInfo) { $tokenCred = $token->getCredentials(); $authCred = $authInfo->getCredentials(); // TODO: Extract validation logic to CredentialsMatcher. if (PasswordUtils::check($tokenCred, $authCred) !== 'OK') { throw new Exception('Incorrect Credentials'); } }