Added support for one-time password verification in session creation
Some checks are pending
CI / check-phpdoc (push) Waiting to run
CI / release (push) Waiting to run
CI / debug (push) Waiting to run
CI / release_executable (push) Waiting to run
CI / debug_executable (push) Waiting to run
CI / check-phpunit (push) Waiting to run
CI / generate-phpdoc (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / release-documentation (push) Blocked by required conditions
CI / release-artifacts (push) Blocked by required conditions

This commit is contained in:
netkas 2025-03-26 18:07:27 -04:00
parent 42498f45db
commit 3c151bfd99
Signed by: netkas
GPG key ID: 4D8629441B76E4CC

View file

@ -62,6 +62,7 @@
{ {
Logger::getLogger()->debug('Creating a session for an enabled peer'); Logger::getLogger()->debug('Creating a session for an enabled peer');
$flags[] = SessionFlags::AUTHENTICATION_REQUIRED; $flags[] = SessionFlags::AUTHENTICATION_REQUIRED;
if(PasswordManager::usesPassword($peer->getUuid())) if(PasswordManager::usesPassword($peer->getUuid()))
{ {
$flags[] = SessionFlags::VER_PASSWORD; $flags[] = SessionFlags::VER_PASSWORD;
@ -71,6 +72,11 @@
{ {
$flags[] = SessionFlags::VER_IMAGE_CAPTCHA; $flags[] = SessionFlags::VER_IMAGE_CAPTCHA;
} }
if(OneTimePasswordManager::usesOtp($peer->getUuid()))
{
$flags[] = SessionFlags::VER_OTP;
}
} }
else else
{ {