Commit 54b92e0a authored by Guillaume Heurtier's avatar Guillaume Heurtier

FEAT #12091 TIME 0:10 fix keycloak connect

parent d71cab04
......@@ -62,6 +62,7 @@ if (isset($_SESSION['web_cas_url'])) {
} elseif (!empty($_SESSION['keycloak']['userId'])) {
$login = $_SESSION['keycloak']['userId'];
$_REQUEST['pass'] = 'maarch';
$method = 'keycloak';
} elseif (!empty($_SESSION['sso']['userId'])) {
$login = $_SESSION['sso']['userId'];
$_REQUEST['pass'] = 'maarch';
......
......@@ -124,7 +124,7 @@ class security extends Database
}
$check = \SrcCore\models\AuthenticationModel::authentication(['userId' => $s_login, 'password' => $pass]);
if ($check || (in_array($method, ['ldap', 'shibboleth', 'cas', 'sso']) && $standardConnect == 'false')) {
if ($check || (in_array($method, ['ldap', 'shibboleth', 'cas', 'sso', 'keycloak']) && $standardConnect == 'false')) {
$user = $uc->getWithComp($s_login, $comp, $params);
}
......
......@@ -329,6 +329,16 @@ class CoreConfigModel
$keycloakConfig['encryptionAlgorithm'] = (string)$loadedXml->ENCRYPTION_ALGORITHM;
$keycloakConfig['encryptionKeyPath'] = (string)$loadedXml->ENCRYPTION_KEY_PATH;
$keycloakConfig['encryptionKey'] = (string)$loadedXml->ENCRYPTION_KEY;
if (empty($keycloakConfig['encryptionAlgorithm'])) {
$keycloakConfig['encryptionAlgorithm'] = null;
}
if (empty($keycloakConfig['encryptionKeyPath'])) {
$keycloakConfig['encryptionKeyPath'] = null;
}
if (empty($keycloakConfig['encryptionKey'])) {
$keycloakConfig['encryptionKey'] = null;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment