35 if (self::$instance === null) {
39 return self::$instance;
60 return $this->amcConfig->getString(
'authsource');
72 $cookieName = $this->amcConfig->getString(
'cookiename',
'AuthMemCookie');
75 "Configuration option 'cookiename' contains an invalid value. This option should be a string." 90 $usernameAttr = $this->amcConfig->getString(
'username', null);
103 $groupsAttr = $this->amcConfig->getString(
'groups', null);
117 $memcacheHost = $this->amcConfig->getString(
'memcache.host',
'127.0.0.1');
118 $memcachePort = $this->amcConfig->getInteger(
'memcache.port', 11211);
120 $class = class_exists(
'Memcache') ?
'Memcache' : (class_exists(
'Memcached') ?
'Memcached' : FALSE);
122 throw new Exception(
'Missing Memcached implementation. You must install either the Memcache or Memcached extension.');
128 foreach (explode(
',', $memcacheHost) as $memcacheHost) {
129 $memcache->addServer($memcacheHost, $memcachePort);
164 self::getInstance()->doLogout();
foreach($authData as $name=> $values) $memcache
getCookieName()
This function retrieves the name of the cookie from the configuration.
__construct()
This function implements the constructor for this class.
getMemcache()
This function creates and initializes a Memcache object from our configuration.
static getInstance()
This function is used to retrieve the singleton instance of this class.
getAuthSource()
Retrieve the authentication source that should be used to authenticate the user.
static setCookie($name, $value, $params=null, $throw=true)
Set a cookie.
getUsernameAttr()
This function retrieves the name of the attribute which contains the username from the configuration...
static getConfig($filename='config.php', $configSet='simplesaml')
Load a configuration file from a configuration set.
getGroupsAttr()
This function retrieves the name of the attribute which contains the groups from the configuration...
doLogout()
This function logs the user out by deleting the session information from memcache.
static logoutHandler()
This function implements the logout handler.