Saml login fixed

(cherry picked from commit 02344033f3)
This commit is contained in:
Arturo Gonzalez 2016-05-26 16:41:58 +02:00
parent 0ee5ccb6b6
commit c0ccd438a9
2 changed files with 9 additions and 8 deletions

View File

@ -464,12 +464,13 @@ define("OPTION_CUSTOM_INPUT", 8);
define("OPTION_AGENT_AUTOCOMPLETE", 9); define("OPTION_AGENT_AUTOCOMPLETE", 9);
/* SAML attributes constants */ /* SAML attributes constants */
define("SAML_ROLE", "urn:mace:rediris.es:entitlement:monitoring:role");
define("SAML_TAG", "urn:mace:rediris.es:entitlement:monitoring:tag"); define("SAML_ROLE_AND_TAG", "eduPersonEntitlement");
define("SAML_USER_DESC", "commonName"); define("SAML_USER_DESC", "commonName");
define("SAML_ID_USER_IN_PANDORA", "eduPersonTargetedId"); define("SAML_ID_USER_IN_PANDORA", "eduPersonTargetedId");
define("SAML_GROUP_IN_PANDORA", "schacHomeOrganization"); define("SAML_GROUP_IN_PANDORA", "schacHomeOrganization");
define("SAML_MAIL_IN_PANDORA", "mail"); define("SAML_MAIL_IN_PANDORA", "mail");
define("SAML_DEFAULT_PROFILES_AND_TAGS_FORM", "urn:mace:rediris.es:entitlement:monitoring:");
/* Other constants */ /* Other constants */
define("STATUS_OK", 0); define("STATUS_OK", 0);

View File

@ -294,7 +294,7 @@ if (! isset ($config['id_user'])) {
$nick_in_db = $saml_user_id; $nick_in_db = $saml_user_id;
if (!$nick_in_db) { if (!$nick_in_db) {
require_once('/opt/simplesamlphp/lib/_autoload.php'); require_once('/opt/simplesamlphp/lib/_autoload.php');
$as = new SimpleSAML_Auth_Simple('example-userpass'); $as = new SimpleSAML_Auth_Simple('PandoraFMS');
$as->logout(); $as->logout();
} }
} }
@ -508,7 +508,7 @@ if (isset ($_GET["bye"])) {
unset($iduser); unset($iduser);
if ($config['auth'] == 'saml') { if ($config['auth'] == 'saml') {
require_once('/opt/simplesamlphp/lib/_autoload.php'); require_once('/opt/simplesamlphp/lib/_autoload.php');
$as = new SimpleSAML_Auth_Simple('example-userpass'); $as = new SimpleSAML_Auth_Simple('PandoraFMS');
$as->logout(); $as->logout();
} }
while (@ob_end_flush ()); while (@ob_end_flush ());