- Модуль: main
- Путь к файлу: ~/bitrix/modules/main/classes/general/liveid.php
- Класс: WindowsLiveLogin
- Вызов: WindowsLiveLogin::processConsentToken
function processConsentToken($token, $context=null)
{
if (!$token) {
$this->debug('Error: processConsentToken: Null token.');
return;
}
$decodedToken = $token;
$parsedToken = $this->parse(urldecode($decodedToken));
if (!$parsedToken) {
$this->debug("Error: processConsentToken: Failed to parse token: $token");
return;
}
$eact = @$parsedToken['eact'];
if ($eact) {
$decodedToken = $this->decodeAndValidateToken($eact);
if (!$decodedToken) {
$this->debug("Error: processConsentToken: Failed to decode/validate token: $token");
return;
}
$parsedToken = $this->parse($decodedToken);
if (!$parsedToken) {
$this->debug("Error: processConsentToken: Failed to parse token after decoding: $token");
return;
}
$decodedToken = urlencode($decodedToken);
}
$consenttoken = null;
//try {
$consenttoken = new WLL_ConsentToken($this,
@$parsedToken['delt'],
@$parsedToken['reft'],
@$parsedToken['skey'],
@$parsedToken['exp'],
@$parsedToken['offer'],
@$parsedToken['lid'],
$context, $decodedToken, $token);
//} catch (Exception $e) {
if($consenttoken->getError() !== false)
$this->debug("Error: processConsentToken: Contents of token considered invalid: " + $consenttoken->getError());
//}
return $consenttoken;
}