Commit ed64359b authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Bug 1631808: auth/saml: add framework for ssphp modules"

parents 76c6c15e 56f05d58
...@@ -32,7 +32,12 @@ foreach ($metadata_files as $file) { ...@@ -32,7 +32,12 @@ foreach ($metadata_files as $file) {
// Fix up session handling config - to match Mahara // Fix up session handling config - to match Mahara
$memcache_config = array(); $memcache_config = array();
if (get_config('memcacheservers') || extension_loaded('memcache')) { if (get_config('memcacheservers') || extension_loaded('memcache')) {
$sessionhandler = 'memcache'; if (empty(get_config('ssphpsessionhandler'))) {
$sessionhandler = 'memcache';
}
else {
$sessionhandler = get_config('ssphpsessionhandler');
}
$servers = get_config('memcacheservers'); $servers = get_config('memcacheservers');
if (empty($servers)) { if (empty($servers)) {
$servers = 'localhost'; $servers = 'localhost';
......
...@@ -39,7 +39,11 @@ spl_autoload_register( ...@@ -39,7 +39,11 @@ spl_autoload_register(
} }
array_shift($classpath); array_shift($classpath);
$module = array_shift($classpath); $module = array_shift($classpath);
$filepath = get_config('docroot') . 'auth/saml/extlib/simplesamlphp/modules/$module/lib/' . implode('/', $classpath) . '.php'; $filepath = get_config('docroot') . 'auth/saml/extlib/simplesamlphp/modules/' . $module . '/lib/' . implode('/', $classpath) . '.php';
if (file_exists($filepath)) {
require_once($filepath);
}
$filepath = get_config('docroot') . 'auth/saml/extlib/modules/' . $module . '/lib/' . implode('/', $classpath) . '.php';
if (file_exists($filepath)) { if (file_exists($filepath)) {
require_once($filepath); require_once($filepath);
} }
......
This is where SimpleSAMLphp modules can be directly distributed with Mahara.
Just copy them into this directory and the autoloader will pick them up.
...@@ -715,3 +715,10 @@ $cfg->passwordsaltalt1 = 'old salt value'; ...@@ -715,3 +715,10 @@ $cfg->passwordsaltalt1 = 'old salt value';
* The default sources are Mozilla Backpack and openbadgepassport.com * The default sources are Mozilla Backpack and openbadgepassport.com
*/ */
$cfg->openbadgedisplayer_source = '{"backpack":"https://backpack.openbadges.org/","passport":"https://openbadgepassport.com/"}'; $cfg->openbadgedisplayer_source = '{"backpack":"https://backpack.openbadges.org/","passport":"https://openbadgepassport.com/"}';
/**
* @global string $cfg->ssphpsessionhandler
* An alternative session handler for SimpleSAMLphp if you do not wish to use memcache.
* Specify the name of the session handler.
*/
// $cfg->ssphpsessionhandler = 'memcached';
\ No newline at end of file
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