add Config::DISABLE_LOGIN_FORM to allow limiting logins to SSO providers

This commit is contained in:
Andrew Dolgov
2025-03-14 11:32:46 +03:00
parent 1fc4eed6cd
commit d373c1f978
4 changed files with 67 additions and 48 deletions

View File

@@ -15,6 +15,9 @@ class Auth_Internal extends Auth_Base implements IAuthModule2 {
/** @param string $service */
function authenticate($login, $password, $service = '') {
if (Config::get(Config::DISABLE_LOGIN_FORM))
return false;
$otp = (int) ($_REQUEST["otp"] ?? 0);
// don't bother with null/null logins for auth_external etc