protected function Callback::_hasValidVerifyToken in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/zendframework/zend-feed/src/PubSubHubbub/Subscriber/Callback.php \Zend\Feed\PubSubHubbub\Subscriber\Callback::_hasValidVerifyToken()
Check for a valid verify_token. By default attempts to compare values with that sent from Hub, otherwise merely ascertains its existence.
Parameters
array $httpGetData:
bool $checkValue:
Return value
bool
2 calls to Callback::_hasValidVerifyToken()
- Callback::handle in vendor/
zendframework/ zend-feed/ src/ PubSubHubbub/ Subscriber/ Callback.php - Handle any callback from a Hub Server responding to a subscription or unsubscription request. This should be the Hub Server confirming the the request prior to taking action on it.
- Callback::isValidHubVerification in vendor/
zendframework/ zend-feed/ src/ PubSubHubbub/ Subscriber/ Callback.php - Checks validity of the request simply by making a quick pass and confirming the presence of all REQUIRED parameters.
File
- vendor/
zendframework/ zend-feed/ src/ PubSubHubbub/ Subscriber/ Callback.php, line 223
Class
Namespace
Zend\Feed\PubSubHubbub\SubscriberCode
protected function _hasValidVerifyToken(array $httpGetData = null, $checkValue = true) {
$verifyTokenKey = $this
->_detectVerifyTokenKey($httpGetData);
if (empty($verifyTokenKey)) {
return false;
}
$verifyTokenExists = $this
->getStorage()
->hasSubscription($verifyTokenKey);
if (!$verifyTokenExists) {
return false;
}
if ($checkValue) {
$data = $this
->getStorage()
->getSubscription($verifyTokenKey);
$verifyToken = $data['verify_token'];
if ($verifyToken !== hash('sha256', $httpGetData['hub_verify_token'])) {
return false;
}
$this->currentSubscriptionData = $data;
return true;
}
return true;
}