Skip to content
Snippets Groups Projects
Verified Commit 3638aa4d authored by Arnaud Pauget's avatar Arnaud Pauget Committed by Jerome Boucher
Browse files

move vhost saml parameters into configuration file

parent caefbdac
No related branches found
No related tags found
2 merge requests!838Rebase develop,!837V3.0
...@@ -179,7 +179,7 @@ abstract class AbstractRequest ...@@ -179,7 +179,7 @@ abstract class AbstractRequest
} }
break; break;
case LAABS_SAML_AUTH: case LAABS_SAML_AUTH:
$samlLib = \laabs::getSAMLlib(); $samlLib = \laabs::configuration('auth')['samlLibrariesDir'];
if (!is_file($samlLib . '/lib/_autoload.php')) { if (!is_file($samlLib . '/lib/_autoload.php')) {
throw new \Exception("Could not find saml autoload file '$samlLib/lib/_autoload.php'"); throw new \Exception("Could not find saml autoload file '$samlLib/lib/_autoload.php'");
} }
...@@ -188,7 +188,8 @@ abstract class AbstractRequest ...@@ -188,7 +188,8 @@ abstract class AbstractRequest
$as->requireAuth(); $as->requireAuth();
$attributes = $as->getAttributes(); $attributes = $as->getAttributes();
$login = $attributes['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name'][0]; $attribute = \laabs::configuration('auth')['samlIdentitiClaims'];
$login = $attributes[$attribute][0];
if (empty($login)) { if (empty($login)) {
var_dump('Authentication Failed : login not present in attributes'); var_dump('Authentication Failed : login not present in attributes');
} }
......
...@@ -362,7 +362,7 @@ class userAuthentication ...@@ -362,7 +362,7 @@ class userAuthentication
// Redirect to SSO disconnect is saml is enabled // Redirect to SSO disconnect is saml is enabled
$authModes = \laabs::getAuthModes(); $authModes = \laabs::getAuthModes();
if (in_array("saml", $authModes)) { if (in_array("saml", $authModes)) {
$samlLib = \laabs::getSAMLlib(); $samlLib = \laabs::configuration('auth')['samlLibrariesDir'];
if (!is_file($samlLib . '/lib/_autoload.php')) { if (!is_file($samlLib . '/lib/_autoload.php')) {
throw new \Exception("Could not find saml autoload file '$samlLib/lib/_autoload.php'"); throw new \Exception("Could not find saml autoload file '$samlLib/lib/_autoload.php'");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment