• Модуль: security
  • Путь к файлу: ~/bitrix/modules/security/lib/mfa/otp.php
  • Класс: BitrixSecurityMfaOtp
  • Вызов: Otp::canSkipByCookie
protected function canSkipByCookie()
{
	if (Option::get('security', 'otp_allow_remember') !== 'Y')
		return false;

	$signedValue = $this->getContext()->getRequest()->getCookie(static::SKIP_COOKIE);

	if (!$signedValue || !is_string($signedValue))
		return false;

	try
	{
		$signer = new TimeSigner();
		$value = $signer
			->setKey($this->getSecret())
			->unsign($signedValue, 'MFA_SAVE');
	}
	catch (BadSignatureException $e)
	{
		return false;
	}

	return ($value === $this->getSkipCookieValue());
}