Commit 4eac5847 authored by Piers Harding's avatar Piers Harding
Browse files

Simplesaml config change - auth/saml (bug #862875)



auth/saml: Fixed session store check inline with new
config structure that ssphp has.

Change-Id: I94dacd84fea8e5b30ae2cf0c99427b4a063a6e5d
Signed-off-by: default avatarPiers Harding <piers@catalyst.net.nz>
parent f820ea6c
......@@ -89,7 +89,8 @@ $as = new SimpleSAML_Auth_Simple($sp);
// Check the SimpleSAMLphp config is compatible
$saml_config = SimpleSAML_Configuration::getInstance();
$session_handler = $saml_config->getString('session.handler', false);
if (!$session_handler || $session_handler == 'phpsession') {
$store_type = $saml_config->getString('store.type', false);
if ($store_type == 'phpsession' || $session_handler == 'phpsession' || (empty($store_type) && empty($session_handler))) {
throw new AuthInstanceException(get_string('errorbadssphp','auth.saml'));
}
......
......@@ -37,7 +37,7 @@ $string['errnosamluser'] = 'No User found';
$string['errorbadlib'] = 'SimpleSAMLPHP lib directory %s is not correct.';
$string['errorbadconfig'] = 'SimpleSAMLPHP config directory %s is in correct.';
$string['errorbadcombo'] = 'You can only choose user auto creation if you have not selected remoteuser';
$string['errorbadinstitution'] = 'There is already an existing authinstance with this institutionattribute and institutionvalue compination';
$string['errorbadinstitutioncombo'] = 'There is already an existing authinstance with this institutionattribute and institutionvalue compination';
$string['errormissinguserattributes'] = 'You seem to be authenticated but we did not receive the required user attributes. Please check that your Identity Provider releases these SSO fields for First Name, Surname, and Email to the Service Provider Mahara is running on or inform the webmaster of this server.';
//$string['idpidentity'] = 'IdP Identity Service';
$string['institutionattribute'] = 'Institution attribute (contains "%s")';
......
......@@ -501,7 +501,7 @@ class PluginAuthSaml extends PluginAuth {
foreach ($dup as $instance) {
if ($instance->instance >= 2) {
// we already have an authinstance with these same values
$form->set_error('institutionattribute', get_string('errorbadinstitution', 'auth.saml'));
$form->set_error('institutionattribute', get_string('errorbadinstitutioncombo', 'auth.saml'));
break;
}
}
......
Supports Markdown
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