From 8b6abc0a5d0f954a2a982750581717c6c54f0514 Mon Sep 17 00:00:00 2001
From: Jaime Perez Crespo <jaime.perez@uninett.no>
Date: Wed, 9 Mar 2016 13:29:08 +0100
Subject: [PATCH] Update the classes in lib/SimpleSAML/ too.
---
lib/SimpleSAML/Auth/LDAP.php | 38 +++++++++----------
lib/SimpleSAML/Auth/ProcessingChain.php | 12 +++---
lib/SimpleSAML/Auth/Simple.php | 4 +-
lib/SimpleSAML/Auth/Source.php | 4 +-
lib/SimpleSAML/Auth/State.php | 12 +++---
lib/SimpleSAML/Error/Error.php | 4 +-
lib/SimpleSAML/Error/Exception.php | 8 ++--
lib/SimpleSAML/IdP.php | 2 +-
lib/SimpleSAML/IdP/LogoutIFrame.php | 2 +-
lib/SimpleSAML/IdP/LogoutTraditional.php | 8 ++--
.../Logger/LoggingHandlerErrorLog.php | 16 ++++----
lib/SimpleSAML/Logger/LoggingHandlerFile.php | 16 ++++----
lib/SimpleSAML/Memcache.php | 16 ++++----
.../Metadata/MetaDataStorageHandler.php | 2 +-
.../Metadata/MetaDataStorageHandlerMDX.php | 18 ++++-----
.../MetaDataStorageHandlerSerialize.php | 24 ++++++------
lib/SimpleSAML/Metadata/SAMLBuilder.php | 2 +-
lib/SimpleSAML/Module.php | 4 +-
lib/SimpleSAML/Session.php | 28 +++++++-------
lib/SimpleSAML/Stats.php | 2 +-
lib/SimpleSAML/Store.php | 2 +-
lib/SimpleSAML/Store/SQL.php | 4 +-
lib/SimpleSAML/Utilities.php | 14 +++----
lib/SimpleSAML/Utils/Config/Metadata.php | 4 +-
lib/SimpleSAML/XHTML/EMail.php | 2 +-
lib/SimpleSAML/XHTML/IdPDisco.php | 2 +-
lib/SimpleSAML/XML/Validator.php | 8 ++--
27 files changed, 129 insertions(+), 129 deletions(-)
diff --git a/lib/SimpleSAML/Auth/LDAP.php b/lib/SimpleSAML/Auth/LDAP.php
index 0f3dc4930..b106079f8 100644
--- a/lib/SimpleSAML/Auth/LDAP.php
+++ b/lib/SimpleSAML/Auth/LDAP.php
@@ -58,7 +58,7 @@ class SimpleSAML_Auth_LDAP {
public function __construct($hostname, $enable_tls = TRUE, $debug = FALSE, $timeout = 0, $port = 389, $referrals = TRUE) {
// Debug
- SimpleSAML_Logger::debug('Library - LDAP __construct(): Setup LDAP with ' .
+ SimpleSAML\Logger::debug('Library - LDAP __construct(): Setup LDAP with ' .
'host=\'' . $hostname .
'\', tls=' . var_export($enable_tls, true) .
', debug=' . var_export($debug, true) .
@@ -72,7 +72,7 @@ class SimpleSAML_Auth_LDAP {
* OpenLDAP 2.x.x or Netscape Directory SDK x.x needed for this option.
*/
if ($debug && !ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7)) {
- SimpleSAML_Logger::warning('Library - LDAP __construct(): Unable to set debug level (LDAP_OPT_DEBUG_LEVEL) to 7');
+ SimpleSAML\Logger::warning('Library - LDAP __construct(): Unable to set debug level (LDAP_OPT_DEBUG_LEVEL) to 7');
}
/*
@@ -99,10 +99,10 @@ class SimpleSAML_Auth_LDAP {
$this->timeout = $timeout;
if ($timeout > 0) {
if (!@ldap_set_option($this->ldap, LDAP_OPT_NETWORK_TIMEOUT, $timeout)) {
- SimpleSAML_Logger::warning('Library - LDAP __construct(): Unable to set timeouts (LDAP_OPT_NETWORK_TIMEOUT) to ' . $timeout);
+ SimpleSAML\Logger::warning('Library - LDAP __construct(): Unable to set timeouts (LDAP_OPT_NETWORK_TIMEOUT) to ' . $timeout);
}
if (!@ldap_set_option($this->ldap, LDAP_OPT_TIMELIMIT, $timeout)) {
- SimpleSAML_Logger::warning('Library - LDAP __construct(): Unable to set timeouts (LDAP_OPT_TIMELIMIT) to ' . $timeout);
+ SimpleSAML\Logger::warning('Library - LDAP __construct(): Unable to set timeouts (LDAP_OPT_TIMELIMIT) to ' . $timeout);
}
}
@@ -128,7 +128,7 @@ class SimpleSAML_Auth_LDAP {
// Log LDAP code and description, if possible
if (empty($this->ldap)) {
- SimpleSAML_Logger::error($description);
+ SimpleSAML\Logger::error($description);
} else {
$errNo = @ldap_errno($this->ldap);
}
@@ -137,9 +137,9 @@ class SimpleSAML_Auth_LDAP {
if ($type) {
if ($errNo !== 0) {
// Only log real LDAP errors; not success
- SimpleSAML_Logger::error($description . '; cause: \'' . ldap_error($this->ldap) . '\' (0x' . dechex($errNo) . ')');
+ SimpleSAML\Logger::error($description . '; cause: \'' . ldap_error($this->ldap) . '\' (0x' . dechex($errNo) . ')');
} else {
- SimpleSAML_Logger::error($description);
+ SimpleSAML\Logger::error($description);
}
switch ($type) {
@@ -163,16 +163,16 @@ class SimpleSAML_Auth_LDAP {
}
switch ($errNo) {
case 0x20://LDAP_NO_SUCH_OBJECT
- SimpleSAML_Logger::warning($description);
+ SimpleSAML\Logger::warning($description);
return new SimpleSAML_Error_UserNotFound($description, $errNo);
case 0x31://LDAP_INVALID_CREDENTIALS
- SimpleSAML_Logger::info($description);
+ SimpleSAML\Logger::info($description);
return new SimpleSAML_Error_InvalidCredential($description, $errNo);
case -1://NO_SERVER_CONNECTION
- SimpleSAML_Logger::error($description);
+ SimpleSAML\Logger::error($description);
return new SimpleSAML_Error_AuthSource('ldap', $description);
default:
- SimpleSAML_Logger::error($description);
+ SimpleSAML\Logger::error($description);
return new SimpleSAML_Error_AuthSource('ldap', $description);
}
}
@@ -219,7 +219,7 @@ class SimpleSAML_Auth_LDAP {
}
// Search using generated filter
- SimpleSAML_Logger::debug('Library - LDAP search(): Searching base \'' . $base . '\' for \'' . $filter . '\'');
+ SimpleSAML\Logger::debug('Library - LDAP search(): Searching base \'' . $base . '\' for \'' . $filter . '\'');
// TODO: Should aliases be dereferenced?
$result = @ldap_search($this->ldap, $base, $filter, array(), 0, 0, $this->timeout);
if ($result === FALSE) {
@@ -296,7 +296,7 @@ class SimpleSAML_Auth_LDAP {
}
}
// Decide what to do for zero entries
- SimpleSAML_Logger::debug('Library - LDAP searchfordn(): No entries found');
+ SimpleSAML\Logger::debug('Library - LDAP searchfordn(): No entries found');
if ($allowZeroHits) {
// Zero hits allowed
return NULL;
@@ -450,7 +450,7 @@ class SimpleSAML_Auth_LDAP {
if ($error === TRUE) {
// Good
$this->authz_id = $authz_id;
- SimpleSAML_Logger::debug('Library - LDAP bind(): Bind successful with DN \'' . $dn . '\'');
+ SimpleSAML\Logger::debug('Library - LDAP bind(): Bind successful with DN \'' . $dn . '\'');
return TRUE;
}
@@ -497,7 +497,7 @@ class SimpleSAML_Auth_LDAP {
}
// Log debug message
- SimpleSAML_Logger::debug(
+ SimpleSAML\Logger::debug(
'ldap:LdapConnection->setOption : Set the LDAP option [' .
$option . '] with the value [' . $value . ']'
);
@@ -531,7 +531,7 @@ class SimpleSAML_Auth_LDAP {
// TODO: Verify that this originally was the intended behaviour. Could $attributes be a string?
$attributes = array();
}
- SimpleSAML_Logger::debug('Library - LDAP getAttributes(): Getting ' . $description . ' from DN \'' . $dn . '\'');
+ SimpleSAML\Logger::debug('Library - LDAP getAttributes(): Getting ' . $description . ' from DN \'' . $dn . '\'');
// Attempt to get attributes
// TODO: Should aliases be dereferenced?
@@ -563,7 +563,7 @@ class SimpleSAML_Auth_LDAP {
if (!empty($maxsize) && strlen($value) >= $maxsize) {
// Ignoring and warning
- SimpleSAML_Logger::warning('Library - LDAP getAttributes(): Attribute \'' .
+ SimpleSAML\Logger::warning('Library - LDAP getAttributes(): Attribute \'' .
$name . '\' exceeded maximum allowed size by ' + ($maxsize - strlen($value)));
continue;
}
@@ -583,7 +583,7 @@ class SimpleSAML_Auth_LDAP {
}
// We're done
- SimpleSAML_Logger::debug('Library - LDAP getAttributes(): Found attributes \'(' . join(',', array_keys($result)) . ')\'');
+ SimpleSAML\Logger::debug('Library - LDAP getAttributes(): Found attributes \'(' . join(',', array_keys($result)) . ')\'');
return $result;
}
@@ -618,7 +618,7 @@ class SimpleSAML_Auth_LDAP {
if ($password !== null) { // checking users credentials ... assuming below that she may read her own attributes ...
if (!$this->bind($dn, $password)) {
- SimpleSAML_Logger::info('Library - LDAP validate(): Failed to authenticate \''. $username . '\' using DN \'' . $dn . '\'');
+ SimpleSAML\Logger::info('Library - LDAP validate(): Failed to authenticate \''. $username . '\' using DN \'' . $dn . '\'');
return FALSE;
}
}
diff --git a/lib/SimpleSAML/Auth/ProcessingChain.php b/lib/SimpleSAML/Auth/ProcessingChain.php
index 9f9da145f..8a718524c 100644
--- a/lib/SimpleSAML/Auth/ProcessingChain.php
+++ b/lib/SimpleSAML/Auth/ProcessingChain.php
@@ -70,7 +70,7 @@ class SimpleSAML_Auth_ProcessingChain {
}
- SimpleSAML_Logger::debug('Filter config for ' . $idpMetadata['entityid'] . '->' .
+ SimpleSAML\Logger::debug('Filter config for ' . $idpMetadata['entityid'] . '->' .
$spMetadata['entityid'] . ': ' . str_replace("\n", '', var_export($this->filters, TRUE)));
}
@@ -148,7 +148,7 @@ class SimpleSAML_Auth_ProcessingChain {
if (!array_key_exists('class', $config))
throw new Exception('Authentication processing filter without name given.');
- $className = SimpleSAML_Module::resolveClass($config['class'], 'Auth_Process', 'SimpleSAML_Auth_ProcessingFilter');
+ $className = SimpleSAML\Module::resolveClass($config['class'], 'Auth_Process', 'SimpleSAML_Auth_ProcessingFilter');
$config['%priority'] = $priority;
unset($config['class']);
return new $className($config, NULL);
@@ -323,10 +323,10 @@ class SimpleSAML_Auth_ProcessingChain {
if (isset($state['Destination']['userid.attribute'])) {
$attributeName = $state['Destination']['userid.attribute'];
- SimpleSAML_Logger::warning("The 'userid.attribute' option has been deprecated.");
+ SimpleSAML\Logger::warning("The 'userid.attribute' option has been deprecated.");
} elseif (isset($state['Source']['userid.attribute'])) {
$attributeName = $state['Source']['userid.attribute'];
- SimpleSAML_Logger::warning("The 'userid.attribute' option has been deprecated.");
+ SimpleSAML\Logger::warning("The 'userid.attribute' option has been deprecated.");
} else {
// Default attribute
$attributeName = 'eduPersonPrincipalName';
@@ -338,12 +338,12 @@ class SimpleSAML_Auth_ProcessingChain {
$uid = $state['Attributes'][$attributeName];
if (count($uid) === 0) {
- SimpleSAML_Logger::warning('Empty user id attribute [' . $attributeName . '].');
+ SimpleSAML\Logger::warning('Empty user id attribute [' . $attributeName . '].');
return;
}
if (count($uid) > 1) {
- SimpleSAML_Logger::warning('Multiple attribute values for user id attribute [' . $attributeName . '].');
+ SimpleSAML\Logger::warning('Multiple attribute values for user id attribute [' . $attributeName . '].');
}
$uid = $uid[0];
diff --git a/lib/SimpleSAML/Auth/Simple.php b/lib/SimpleSAML/Auth/Simple.php
index 32c5bb9f4..32080c479 100644
--- a/lib/SimpleSAML/Auth/Simple.php
+++ b/lib/SimpleSAML/Auth/Simple.php
@@ -297,7 +297,7 @@ class SimpleSAML_Auth_Simple {
$returnTo = \SimpleSAML\Utils\HTTP::getSelfURL();
}
- $login = SimpleSAML_Module::getModuleURL('core/as_login.php', array(
+ $login = SimpleSAML\Module::getModuleURL('core/as_login.php', array(
'AuthId' => $this->authSource,
'ReturnTo' => $returnTo,
));
@@ -320,7 +320,7 @@ class SimpleSAML_Auth_Simple {
$returnTo = \SimpleSAML\Utils\HTTP::getSelfURL();
}
- $logout = SimpleSAML_Module::getModuleURL('core/as_logout.php', array(
+ $logout = SimpleSAML\Module::getModuleURL('core/as_logout.php', array(
'AuthId' => $this->authSource,
'ReturnTo' => $returnTo,
));
diff --git a/lib/SimpleSAML/Auth/Source.php b/lib/SimpleSAML/Auth/Source.php
index b9cceb41e..122263ea3 100644
--- a/lib/SimpleSAML/Auth/Source.php
+++ b/lib/SimpleSAML/Auth/Source.php
@@ -295,7 +295,7 @@ abstract class SimpleSAML_Auth_Source
self::validateSource($config, $authId);
- $className = SimpleSAML_Module::resolveClass($config[0], 'Auth_Source', 'SimpleSAML_Auth_Source');
+ $className = SimpleSAML\Module::resolveClass($config[0], 'Auth_Source', 'SimpleSAML_Auth_Source');
$info = array('AuthId' => $authId);
unset($config[0]);
@@ -369,7 +369,7 @@ abstract class SimpleSAML_Auth_Source
$session = SimpleSAML_Session::getSessionFromRequest();
if (!$session->isValid($source)) {
- SimpleSAML_Logger::warning(
+ SimpleSAML\Logger::warning(
'Received logout from an invalid authentication source '.
var_export($source, true)
);
diff --git a/lib/SimpleSAML/Auth/State.php b/lib/SimpleSAML/Auth/State.php
index 106304695..b08b5a11c 100644
--- a/lib/SimpleSAML/Auth/State.php
+++ b/lib/SimpleSAML/Auth/State.php
@@ -200,7 +200,7 @@ class SimpleSAML_Auth_State {
$session = SimpleSAML_Session::getSessionFromRequest();
$session->setData('SimpleSAML_Auth_State', $id, $serializedState, self::getStateTimeout());
- SimpleSAML_Logger::debug('Saved state: ' . var_export($return, TRUE));
+ SimpleSAML\Logger::debug('Saved state: ' . var_export($return, TRUE));
return $return;
}
@@ -221,9 +221,9 @@ class SimpleSAML_Auth_State {
$clonedState[self::CLONE_ORIGINAL_ID] = $state[self::ID];
unset($clonedState[self::ID]);
- SimpleSAML_Logger::debug('Cloned state: ' . var_export($state[self::ID], TRUE));
+ SimpleSAML\Logger::debug('Cloned state: ' . var_export($state[self::ID], TRUE));
} else {
- SimpleSAML_Logger::debug('Cloned state with undefined id.');
+ SimpleSAML\Logger::debug('Cloned state with undefined id.');
}
return $clonedState;
@@ -246,7 +246,7 @@ class SimpleSAML_Auth_State {
assert('is_string($id)');
assert('is_string($stage)');
assert('is_bool($allowMissing)');
- SimpleSAML_Logger::debug('Loading state: ' . var_export($id, TRUE));
+ SimpleSAML\Logger::debug('Loading state: ' . var_export($id, TRUE));
$sid = self::parseStateID($id);
@@ -281,7 +281,7 @@ class SimpleSAML_Auth_State {
$msg = 'Wrong stage in state. Was \'' . $state[self::STAGE] .
'\', should be \'' . $stage . '\'.';
- SimpleSAML_Logger::warning($msg);
+ SimpleSAML\Logger::warning($msg);
if ($sid['url'] === NULL) {
throw new Exception($msg);
@@ -309,7 +309,7 @@ class SimpleSAML_Auth_State {
return;
}
- SimpleSAML_Logger::debug('Deleting state: ' . var_export($state[self::ID], TRUE));
+ SimpleSAML\Logger::debug('Deleting state: ' . var_export($state[self::ID], TRUE));
$session = SimpleSAML_Session::getSessionFromRequest();
$session->deleteData('SimpleSAML_Auth_State', $state[self::ID]);
diff --git a/lib/SimpleSAML/Error/Error.php b/lib/SimpleSAML/Error/Error.php
index 69662ab94..eb21fc578 100644
--- a/lib/SimpleSAML/Error/Error.php
+++ b/lib/SimpleSAML/Error/Error.php
@@ -192,7 +192,7 @@ class SimpleSAML_Error_Error extends SimpleSAML_Error_Exception
if (!array_key_exists($this->httpCode, $httpCodesMap)) {
$httpCode = 500;
- SimpleSAML_Logger::warning('HTTP response code not defined: '.var_export($this->httpCode, true));
+ SimpleSAML\Logger::warning('HTTP response code not defined: '.var_export($this->httpCode, true));
}
header($httpCodesMap[$httpCode]);
@@ -211,7 +211,7 @@ class SimpleSAML_Error_Error extends SimpleSAML_Error_Exception
$etrace = implode("\n", $data);
$reportId = bin2hex(openssl_random_pseudo_bytes(4));
- SimpleSAML_Logger::error('Error report with id '.$reportId.' generated.');
+ SimpleSAML\Logger::error('Error report with id '.$reportId.' generated.');
$config = SimpleSAML_Configuration::getInstance();
$session = SimpleSAML_Session::getSessionFromRequest();
diff --git a/lib/SimpleSAML/Error/Exception.php b/lib/SimpleSAML/Error/Exception.php
index 2872b335a..55b86ae14 100644
--- a/lib/SimpleSAML/Error/Exception.php
+++ b/lib/SimpleSAML/Error/Exception.php
@@ -184,7 +184,7 @@ class SimpleSAML_Error_Exception extends Exception
$lines = $this->format();
foreach ($lines as $line) {
- SimpleSAML_Logger::error($line);
+ SimpleSAML\Logger::error($line);
}
}
@@ -199,7 +199,7 @@ class SimpleSAML_Error_Exception extends Exception
$lines = $this->format();
foreach ($lines as $line) {
- SimpleSAML_Logger::warning($line);
+ SimpleSAML\Logger::warning($line);
}
}
@@ -214,7 +214,7 @@ class SimpleSAML_Error_Exception extends Exception
$lines = $this->format();
foreach ($lines as $line) {
- SimpleSAML_Logger::debug($line);
+ SimpleSAML\Logger::debug($line);
}
}
@@ -229,7 +229,7 @@ class SimpleSAML_Error_Exception extends Exception
$lines = $this->format();
foreach ($lines as $line) {
- SimpleSAML_Logger::debug($line);
+ SimpleSAML\Logger::debug($line);
}
}
diff --git a/lib/SimpleSAML/IdP.php b/lib/SimpleSAML/IdP.php
index 86cf72e83..a43b48c3a 100644
--- a/lib/SimpleSAML/IdP.php
+++ b/lib/SimpleSAML/IdP.php
@@ -492,7 +492,7 @@ class SimpleSAML_IdP
// terminate the local session
$id = SimpleSAML_Auth_State::saveState($state, 'core:Logout:afterbridge');
- $returnTo = SimpleSAML_Module::getModuleURL('core/idp/resumelogout.php', array('id' => $id));
+ $returnTo = SimpleSAML\Module::getModuleURL('core/idp/resumelogout.php', array('id' => $id));
$this->authSource->logout($returnTo);
diff --git a/lib/SimpleSAML/IdP/LogoutIFrame.php b/lib/SimpleSAML/IdP/LogoutIFrame.php
index dd31d4c73..b4948a057 100644
--- a/lib/SimpleSAML/IdP/LogoutIFrame.php
+++ b/lib/SimpleSAML/IdP/LogoutIFrame.php
@@ -50,7 +50,7 @@ class SimpleSAML_IdP_LogoutIFrame extends SimpleSAML_IdP_LogoutHandler
$params['type'] = $state['core:Logout-IFrame:InitType'];
}
- $url = SimpleSAML_Module::getModuleURL('core/idp/logout-iframe.php', $params);
+ $url = SimpleSAML\Module::getModuleURL('core/idp/logout-iframe.php', $params);
\SimpleSAML\Utils\HTTP::redirectTrustedURL($url);
}
diff --git a/lib/SimpleSAML/IdP/LogoutTraditional.php b/lib/SimpleSAML/IdP/LogoutTraditional.php
index 1160908da..ee7a45f2e 100644
--- a/lib/SimpleSAML/IdP/LogoutTraditional.php
+++ b/lib/SimpleSAML/IdP/LogoutTraditional.php
@@ -26,14 +26,14 @@ class SimpleSAML_IdP_LogoutTraditional extends SimpleSAML_IdP_LogoutHandler
$relayState = SimpleSAML_Auth_State::saveState($state, 'core:LogoutTraditional', true);
$id = $association['id'];
- SimpleSAML_Logger::info('Logging out of '.var_export($id, true).'.');
+ SimpleSAML\Logger::info('Logging out of '.var_export($id, true).'.');
try {
$idp = SimpleSAML_IdP::getByState($association);
$url = call_user_func(array($association['Handler'], 'getLogoutURL'), $idp, $association, $relayState);
\SimpleSAML\Utils\HTTP::redirectTrustedURL($url);
} catch (Exception $e) {
- SimpleSAML_Logger::warning('Unable to initialize logout to '.var_export($id, true).'.');
+ SimpleSAML\Logger::warning('Unable to initialize logout to '.var_export($id, true).'.');
$this->idp->terminateAssociation($id);
$state['core:Failed'] = true;
@@ -83,10 +83,10 @@ class SimpleSAML_IdP_LogoutTraditional extends SimpleSAML_IdP_LogoutHandler
$state = SimpleSAML_Auth_State::loadState($relayState, 'core:LogoutTraditional');
if ($error === null) {
- SimpleSAML_Logger::info('Logged out of '.var_export($assocId, true).'.');
+ SimpleSAML\Logger::info('Logged out of '.var_export($assocId, true).'.');
$this->idp->terminateAssociation($assocId);
} else {
- SimpleSAML_Logger::warning('Error received from '.var_export($assocId, true).' during logout:');
+ SimpleSAML\Logger::warning('Error received from '.var_export($assocId, true).' during logout:');
$error->logWarning();
$state['core:Failed'] = true;
}
diff --git a/lib/SimpleSAML/Logger/LoggingHandlerErrorLog.php b/lib/SimpleSAML/Logger/LoggingHandlerErrorLog.php
index 8104286ab..119027a75 100644
--- a/lib/SimpleSAML/Logger/LoggingHandlerErrorLog.php
+++ b/lib/SimpleSAML/Logger/LoggingHandlerErrorLog.php
@@ -16,14 +16,14 @@ class SimpleSAML_Logger_LoggingHandlerErrorLog implements SimpleSAML_Logger_Logg
* This array contains the mappings from syslog loglevel to names.
*/
private static $levelNames = array(
- SimpleSAML_Logger::EMERG => 'EMERG',
- SimpleSAML_Logger::ALERT => 'ALERT',
- SimpleSAML_Logger::CRIT => 'CRIT',
- SimpleSAML_Logger::ERR => 'ERR',
- SimpleSAML_Logger::WARNING => 'WARNING',
- SimpleSAML_Logger::NOTICE => 'NOTICE',
- SimpleSAML_Logger::INFO => 'INFO',
- SimpleSAML_Logger::DEBUG => 'DEBUG',
+ SimpleSAML\Logger::EMERG => 'EMERG',
+ SimpleSAML\Logger::ALERT => 'ALERT',
+ SimpleSAML\Logger::CRIT => 'CRIT',
+ SimpleSAML\Logger::ERR => 'ERR',
+ SimpleSAML\Logger::WARNING => 'WARNING',
+ SimpleSAML\Logger::NOTICE => 'NOTICE',
+ SimpleSAML\Logger::INFO => 'INFO',
+ SimpleSAML\Logger::DEBUG => 'DEBUG',
);
private $format;
diff --git a/lib/SimpleSAML/Logger/LoggingHandlerFile.php b/lib/SimpleSAML/Logger/LoggingHandlerFile.php
index f765c3e24..b09993cca 100644
--- a/lib/SimpleSAML/Logger/LoggingHandlerFile.php
+++ b/lib/SimpleSAML/Logger/LoggingHandlerFile.php
@@ -16,14 +16,14 @@ class SimpleSAML_Logger_LoggingHandlerFile implements SimpleSAML_Logger_LoggingH
* more or less directly from SimpleSAML_Logger_LoggingHandlerErrorLog.
*/
private static $levelNames = array(
- SimpleSAML_Logger::EMERG => 'EMERGENCY',
- SimpleSAML_Logger::ALERT => 'ALERT',
- SimpleSAML_Logger::CRIT => 'CRITICAL',
- SimpleSAML_Logger::ERR => 'ERROR',
- SimpleSAML_Logger::WARNING => 'WARNING',
- SimpleSAML_Logger::NOTICE => 'NOTICE',
- SimpleSAML_Logger::INFO => 'INFO',
- SimpleSAML_Logger::DEBUG => 'DEBUG',
+ SimpleSAML\Logger::EMERG => 'EMERGENCY',
+ SimpleSAML\Logger::ALERT => 'ALERT',
+ SimpleSAML\Logger::CRIT => 'CRITICAL',
+ SimpleSAML\Logger::ERR => 'ERROR',
+ SimpleSAML\Logger::WARNING => 'WARNING',
+ SimpleSAML\Logger::NOTICE => 'NOTICE',
+ SimpleSAML\Logger::INFO => 'INFO',
+ SimpleSAML\Logger::DEBUG => 'DEBUG',
);
private $logFile = NULL;
private $processname = NULL;
diff --git a/lib/SimpleSAML/Memcache.php b/lib/SimpleSAML/Memcache.php
index 9eb628f18..a7caceb4a 100644
--- a/lib/SimpleSAML/Memcache.php
+++ b/lib/SimpleSAML/Memcache.php
@@ -37,7 +37,7 @@ class SimpleSAML_Memcache
*/
public static function get($key)
{
- SimpleSAML_Logger::debug("loading key $key from memcache");
+ SimpleSAML\Logger::debug("loading key $key from memcache");
$latestInfo = null;
$latestTime = 0.0;
@@ -68,19 +68,19 @@ class SimpleSAML_Memcache
* - 'data': The data.
*/
if (!is_array($info)) {
- SimpleSAML_Logger::warning(
+ SimpleSAML\Logger::warning(
'Retrieved invalid data from a memcache server. Data was not an array.'
);
continue;
}
if (!array_key_exists('timestamp', $info)) {
- SimpleSAML_Logger::warning(
+ SimpleSAML\Logger::warning(
'Retrieved invalid data from a memcache server. Missing timestamp.'
);
continue;
}
if (!array_key_exists('data', $info)) {
- SimpleSAML_Logger::warning(
+ SimpleSAML\Logger::warning(
'Retrieved invalid data from a memcache server. Missing data.'
);
continue;
@@ -117,13 +117,13 @@ class SimpleSAML_Memcache
throw new SimpleSAML_Error_Exception('All memcache servers are down', 503, $e);
}
// we didn't find any data matching the key
- SimpleSAML_Logger::debug("key $key not found in memcache");
+ SimpleSAML\Logger::debug("key $key not found in memcache");
return null;
}
if ($mustUpdate) {
// we found data matching the key, but some of the servers need updating
- SimpleSAML_Logger::debug("Memcache servers out of sync for $key, forcing sync");
+ SimpleSAML\Logger::debug("Memcache servers out of sync for $key, forcing sync");
self::set($key, $latestData);
}
@@ -140,7 +140,7 @@ class SimpleSAML_Memcache
*/
public static function set($key, $value, $expire = null)
{
- SimpleSAML_Logger::debug("saving key $key to memcache");
+ SimpleSAML\Logger::debug("saving key $key to memcache");
$savedInfo = array(
'timestamp' => microtime(true),
'data' => $value
@@ -167,7 +167,7 @@ class SimpleSAML_Memcache
public static function delete($key)
{
assert('is_string($key)');
- SimpleSAML_Logger::debug("deleting key $key from memcache");
+ SimpleSAML\Logger::debug("deleting key $key from memcache");
// store this object to all groups of memcache servers
foreach (self::getMemcacheServers() as $server) {
diff --git a/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php b/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php
index 5c1c6e89d..18083c27a 100644
--- a/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php
+++ b/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php
@@ -150,7 +150,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandler
if (array_key_exists('expire', $le)) {
if ($le['expire'] < time()) {
unset($srcList[$key]);
- SimpleSAML_Logger::warning(
+ SimpleSAML\Logger::warning(
"Dropping metadata entity ".var_export($key, true).", expired ".
SimpleSAML\Utils\Time::generateTimestamp($le['expire'])."."
);
diff --git a/lib/SimpleSAML/Metadata/MetaDataStorageHandlerMDX.php b/lib/SimpleSAML/Metadata/MetaDataStorageHandlerMDX.php
index c06a9e04b..4800d74ab 100644
--- a/lib/SimpleSAML/Metadata/MetaDataStorageHandlerMDX.php
+++ b/lib/SimpleSAML/Metadata/MetaDataStorageHandlerMDX.php
@@ -148,7 +148,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerMDX extends SimpleSAML_Metadata_
if (!is_readable($cachefilename)) {
throw new Exception('Could not read cache file for entity ['.$cachefilename.']');
}
- SimpleSAML_Logger::debug('MetaData - Handler.MDX: Reading cache ['.$entityId.'] => ['.$cachefilename.']');
+ SimpleSAML\Logger::debug('MetaData - Handler.MDX: Reading cache ['.$entityId.'] => ['.$cachefilename.']');
/* Ensure that this metadata isn't older that the cachelength option allows. This
* must be verified based on the file, since this option may be changed after the
@@ -156,7 +156,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerMDX extends SimpleSAML_Metadata_
*/
$stat = stat($cachefilename);
if ($stat['mtime'] + $this->cacheLength <= time()) {
- SimpleSAML_Logger::debug('MetaData - Handler.MDX: Cache file older that the cachelength option allows.');
+ SimpleSAML\Logger::debug('MetaData - Handler.MDX: Cache file older that the cachelength option allows.');
return null;
}
@@ -204,7 +204,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerMDX extends SimpleSAML_Metadata_
if (!is_writable(dirname($cachefilename))) {
throw new Exception('Could not write cache file for entity ['.$cachefilename.']');
}
- SimpleSAML_Logger::debug('MetaData - Handler.MDX: Writing cache ['.$entityId.'] => ['.$cachefilename.']');
+ SimpleSAML\Logger::debug('MetaData - Handler.MDX: Writing cache ['.$entityId.'] => ['.$cachefilename.']');
file_put_contents($cachefilename, serialize($data));
}
@@ -236,7 +236,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerMDX extends SimpleSAML_Metadata_
return $ret[0];
default:
- SimpleSAML_Logger::warning('MetaData - Handler.MDX: Unknown metadata set: '.$set);
+ SimpleSAML\Logger::warning('MetaData - Handler.MDX: Unknown metadata set: '.$set);
}
return null;
@@ -265,7 +265,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerMDX extends SimpleSAML_Metadata_
assert('is_string($index)');
assert('is_string($set)');
- SimpleSAML_Logger::info('MetaData - Handler.MDX: Loading metadata entity ['.$index.'] from ['.$set.']');
+ SimpleSAML\Logger::info('MetaData - Handler.MDX: Loading metadata entity ['.$index.'] from ['.$set.']');
// read from cache if possible
$data = $this->getFromCache($set, $index);
@@ -277,18 +277,18 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerMDX extends SimpleSAML_Metadata_
if (isset($data)) {
// metadata found in cache and not expired
- SimpleSAML_Logger::debug('MetaData - Handler.MDX: Using cached metadata for: '.$index.'.');
+ SimpleSAML\Logger::debug('MetaData - Handler.MDX: Using cached metadata for: '.$index.'.');
return $data;
}
// look at Metadata Query Protocol: https://github.com/iay/md-query/blob/master/draft-young-md-query.txt
$mdx_url = $this->server.'/entities/'.urlencode($index);
- SimpleSAML_Logger::debug('MetaData - Handler.MDX: Downloading metadata for "'.$index.'" from ['.$mdx_url.']');
+ SimpleSAML\Logger::debug('MetaData - Handler.MDX: Downloading metadata for "'.$index.'" from ['.$mdx_url.']');
try {
$xmldata = \SimpleSAML\Utils\HTTP::fetch($mdx_url);
} catch (Exception $e) {
- SimpleSAML_Logger::warning('Fetching metadata for '.$index.': '.$e->getMessage());
+ SimpleSAML\Logger::warning('Fetching metadata for '.$index.': '.$e->getMessage());
}
if (empty($xmldata)) {
@@ -300,7 +300,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerMDX extends SimpleSAML_Metadata_
/** @var string $xmldata */
$entity = SimpleSAML_Metadata_SAMLParser::parseString($xmldata);
- SimpleSAML_Logger::debug('MetaData - Handler.MDX: Completed parsing of ['.$mdx_url.']');
+ SimpleSAML\Logger::debug('MetaData - Handler.MDX: Completed parsing of ['.$mdx_url.']');
if ($this->validateFingerprint !== null) {
if (!$entity->validateFingerprint($this->validateFingerprint)) {
diff --git a/lib/SimpleSAML/Metadata/MetaDataStorageHandlerSerialize.php b/lib/SimpleSAML/Metadata/MetaDataStorageHandlerSerialize.php
index 0b70e7797..a34f19491 100644
--- a/lib/SimpleSAML/Metadata/MetaDataStorageHandlerSerialize.php
+++ b/lib/SimpleSAML/Metadata/MetaDataStorageHandlerSerialize.php
@@ -77,7 +77,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerSerialize extends SimpleSAML_Met
$dh = @opendir($this->directory);
if ($dh === false) {
- SimpleSAML_Logger::warning(
+ SimpleSAML\Logger::warning(
'Serialize metadata handler: Unable to open directory: '.var_export($this->directory, true)
);
return $ret;
@@ -93,7 +93,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerSerialize extends SimpleSAML_Met
$path = $this->directory.'/'.$entry;
if (!is_dir($path)) {
- SimpleSAML_Logger::warning(
+ SimpleSAML\Logger::warning(
'Serialize metadata handler: Metadata directory contained a file where only directories should '.
'exist: '.var_export($path, true)
);
@@ -130,7 +130,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerSerialize extends SimpleSAML_Met
$dh = @opendir($dir);
if ($dh === false) {
- SimpleSAML_Logger::warning('Serialize metadata handler: Unable to open directory: '.var_export($dir, true));
+ SimpleSAML\Logger::warning('Serialize metadata handler: Unable to open directory: '.var_export($dir, true));
return $ret;
}
@@ -183,7 +183,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerSerialize extends SimpleSAML_Met
$data = @file_get_contents($filePath);
if ($data === false) {
$error = error_get_last();
- SimpleSAML_Logger::warning(
+ SimpleSAML\Logger::warning(
'Error reading file '.$filePath.': '.$error['message']
);
return null;
@@ -191,7 +191,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerSerialize extends SimpleSAML_Met
$data = @unserialize($data);
if ($data === false) {
- SimpleSAML_Logger::warning('Error unserializing file: '.$filePath);
+ SimpleSAML\Logger::warning('Error unserializing file: '.$filePath);
return null;
}
@@ -219,30 +219,30 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerSerialize extends SimpleSAML_Met
$dir = dirname($filePath);
if (!is_dir($dir)) {
- SimpleSAML_Logger::info('Creating directory: '.$dir);
+ SimpleSAML\Logger::info('Creating directory: '.$dir);
$res = @mkdir($dir, 0777, true);
if ($res === false) {
$error = error_get_last();
- SimpleSAML_Logger::error('Failed to create directory '.$dir.': '.$error['message']);
+ SimpleSAML\Logger::error('Failed to create directory '.$dir.': '.$error['message']);
return false;
}
}
$data = serialize($metadata);
- SimpleSAML_Logger::debug('Writing: '.$newPath);
+ SimpleSAML\Logger::debug('Writing: '.$newPath);
$res = file_put_contents($newPath, $data);
if ($res === false) {
$error = error_get_last();
- SimpleSAML_Logger::error('Error saving file '.$newPath.': '.$error['message']);
+ SimpleSAML\Logger::error('Error saving file '.$newPath.': '.$error['message']);
return false;
}
$res = rename($newPath, $filePath);
if ($res === false) {
$error = error_get_last();
- SimpleSAML_Logger::error('Error renaming '.$newPath.' to '.$filePath.': '.$error['message']);
+ SimpleSAML\Logger::error('Error renaming '.$newPath.' to '.$filePath.': '.$error['message']);
return false;
}
@@ -264,7 +264,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerSerialize extends SimpleSAML_Met
$filePath = $this->getMetadataPath($entityId, $set);
if (!file_exists($filePath)) {
- SimpleSAML_Logger::warning(
+ SimpleSAML\Logger::warning(
'Attempted to erase nonexistent metadata entry '.
var_export($entityId, true).' in set '.var_export($set, true).'.'
);
@@ -274,7 +274,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerSerialize extends SimpleSAML_Met
$res = unlink($filePath);
if ($res === false) {
$error = error_get_last();
- SimpleSAML_Logger::error(
+ SimpleSAML\Logger::error(
'Failed to delete file '.$filePath.
': '.$error['message']
);
diff --git a/lib/SimpleSAML/Metadata/SAMLBuilder.php b/lib/SimpleSAML/Metadata/SAMLBuilder.php
index 59b326404..0d8f0e65f 100644
--- a/lib/SimpleSAML/Metadata/SAMLBuilder.php
+++ b/lib/SimpleSAML/Metadata/SAMLBuilder.php
@@ -454,7 +454,7 @@ class SimpleSAML_Metadata_SAMLBuilder
$this->addAttributeAuthority($metadata);
break;
default:
- SimpleSAML_Logger::warning('Unable to generate metadata for unknown type \''.$set.'\'.');
+ SimpleSAML\Logger::warning('Unable to generate metadata for unknown type \''.$set.'\'.');
}
}
diff --git a/lib/SimpleSAML/Module.php b/lib/SimpleSAML/Module.php
index ef0d9d0d0..c9ff286f1 100644
--- a/lib/SimpleSAML/Module.php
+++ b/lib/SimpleSAML/Module.php
@@ -47,7 +47,7 @@ class Module
$nspath = join('\\', $path);
if (class_exists('SimpleSAML\Module\\'.$module.'\\'.$nspath)) {
// the class has been migrated, create an alias and warn about it
- \SimpleSAML_Logger::warning(
+ \SimpleSAML\Logger::warning(
"The class '$className' is now using namespaces, please use 'SimpleSAML\\Module\\$module\\".
"$nspath' instead."
);
@@ -145,7 +145,7 @@ class Module
!file_exists($moduleDir.'/default-enable') &&
!file_exists($moduleDir.'/default-disable')
) {
- \SimpleSAML_Logger::error("Missing default-enable or default-disable file for the module $module");
+ \SimpleSAML\Logger::error("Missing default-enable or default-disable file for the module $module");
}
if (file_exists($moduleDir.'/enable')) {
diff --git a/lib/SimpleSAML/Session.php b/lib/SimpleSAML/Session.php
index d0a521468..592414190 100644
--- a/lib/SimpleSAML/Session.php
+++ b/lib/SimpleSAML/Session.php
@@ -142,7 +142,7 @@ class SimpleSAML_Session
if ($transient) { // transient session
$sh = SimpleSAML_SessionHandler::getSessionHandler();
$this->trackid = 'TR'.bin2hex(openssl_random_pseudo_bytes(4));
- SimpleSAML_Logger::setTrackId($this->trackid);
+ SimpleSAML\Logger::setTrackId($this->trackid);
$this->transient = true;
/*
@@ -159,7 +159,7 @@ class SimpleSAML_Session
$this->sessionId = $sh->newSessionId();
$this->trackid = bin2hex(openssl_random_pseudo_bytes(5));
- SimpleSAML_Logger::setTrackId($this->trackid);
+ SimpleSAML\Logger::setTrackId($this->trackid);
$this->markDirty();
@@ -195,7 +195,7 @@ class SimpleSAML_Session
// for some reason, we were unable to initialize this session, use a transient session instead
self::useTransientSession();
- SimpleSAML_Logger::error('Error loading session: '.$e->getMessage());
+ SimpleSAML\Logger::error('Error loading session: '.$e->getMessage());
if ($e instanceof SimpleSAML_Error_Exception) {
$cause = $e->getCause();
if ($cause instanceof Exception) {
@@ -268,11 +268,11 @@ class SimpleSAML_Session
'SimpleSAMLAuthToken'
);
if (!isset($_COOKIE[$authTokenCookieName])) {
- SimpleSAML_Logger::warning('Missing AuthToken cookie.');
+ SimpleSAML\Logger::warning('Missing AuthToken cookie.');
return null;
}
if ($_COOKIE[$authTokenCookieName] !== $session->authToken) {
- SimpleSAML_Logger::warning('Invalid AuthToken cookie.');
+ SimpleSAML\Logger::warning('Invalid AuthToken cookie.');
return null;
}
}
@@ -283,7 +283,7 @@ class SimpleSAML_Session
assert('is_callable($checkFunction)');
$check = call_user_func($checkFunction, $session);
if ($check !== true) {
- SimpleSAML_Logger::warning('Session did not pass check function.');
+ SimpleSAML\Logger::warning('Session did not pass check function.');
return null;
}
}
@@ -307,7 +307,7 @@ class SimpleSAML_Session
*/
private static function load(SimpleSAML_Session $session)
{
- SimpleSAML_Logger::setTrackId($session->getTrackID());
+ SimpleSAML\Logger::setTrackId($session->getTrackID());
self::$instance = $session;
return self::$instance;
}
@@ -365,7 +365,7 @@ class SimpleSAML_Session
if (!($e instanceof SimpleSAML_Error_Exception)) {
$e = new SimpleSAML_Error_UnserializableException($e);
}
- SimpleSAML_Logger::error('Unable to save session.');
+ SimpleSAML\Logger::error('Unable to save session.');
$e->logError();
}
}
@@ -480,7 +480,7 @@ class SimpleSAML_Session
assert('is_string($authority)');
assert('is_array($data) || is_null($data)');
- SimpleSAML_Logger::debug('Session: doLogin("'.$authority.'")');
+ SimpleSAML\Logger::debug('Session: doLogin("'.$authority.'")');
$this->markDirty();
@@ -533,10 +533,10 @@ class SimpleSAML_Session
*/
public function doLogout($authority)
{
- SimpleSAML_Logger::debug('Session: doLogout('.var_export($authority, true).')');
+ SimpleSAML\Logger::debug('Session: doLogout('.var_export($authority, true).')');
if (!isset($this->authData[$authority])) {
- SimpleSAML_Logger::debug('Session: Already logged out of '.$authority.'.');
+ SimpleSAML\Logger::debug('Session: Already logged out of '.$authority.'.');
return;
}
@@ -600,7 +600,7 @@ class SimpleSAML_Session
assert('is_string($authority)');
if (!isset($this->authData[$authority])) {
- SimpleSAML_Logger::debug(
+ SimpleSAML\Logger::debug(
'Session: '.var_export($authority, true).
' not valid because we are not authenticated.'
);
@@ -608,11 +608,11 @@ class SimpleSAML_Session
}
if ($this->authData[$authority]['Expire'] <= time()) {
- SimpleSAML_Logger::debug('Session: '.var_export($authority, true).' not valid because it is expired.');
+ SimpleSAML\Logger::debug('Session: '.var_export($authority, true).' not valid because it is expired.');
return false;
}
- SimpleSAML_Logger::debug('Session: Valid session found with '.var_export($authority, true).'.');
+ SimpleSAML\Logger::debug('Session: Valid session found with '.var_export($authority, true).'.');
return true;
}
diff --git a/lib/SimpleSAML/Stats.php b/lib/SimpleSAML/Stats.php
index 42bd72cf5..6c962f015 100644
--- a/lib/SimpleSAML/Stats.php
+++ b/lib/SimpleSAML/Stats.php
@@ -37,7 +37,7 @@ class SimpleSAML_Stats
private static function createOutput(SimpleSAML_Configuration $config)
{
$cls = $config->getString('class');
- $cls = SimpleSAML_Module::resolveClass($cls, 'Stats_Output', 'SimpleSAML_Stats_Output');
+ $cls = SimpleSAML\Module::resolveClass($cls, 'Stats_Output', 'SimpleSAML_Stats_Output');
$output = new $cls($config);
return $output;
diff --git a/lib/SimpleSAML/Store.php b/lib/SimpleSAML/Store.php
index 3d638d88a..914b6b687 100644
--- a/lib/SimpleSAML/Store.php
+++ b/lib/SimpleSAML/Store.php
@@ -50,7 +50,7 @@ abstract class SimpleSAML_Store
break;
default:
// datastore from module
- $className = SimpleSAML_Module::resolveClass($storeType, 'Store', 'SimpleSAML_Store');
+ $className = SimpleSAML\Module::resolveClass($storeType, 'Store', 'SimpleSAML_Store');
self::$instance = new $className();
}
diff --git a/lib/SimpleSAML/Store/SQL.php b/lib/SimpleSAML/Store/SQL.php
index 2766892c3..9a3666a7c 100644
--- a/lib/SimpleSAML/Store/SQL.php
+++ b/lib/SimpleSAML/Store/SQL.php
@@ -180,7 +180,7 @@ class SimpleSAML_Store_SQL extends SimpleSAML_Store {
case '23505': // PostgreSQL
break;
default:
- SimpleSAML_Logger::error('Error while saving data: ' . $e->getMessage());
+ SimpleSAML\Logger::error('Error while saving data: ' . $e->getMessage());
throw $e;
}
}
@@ -209,7 +209,7 @@ class SimpleSAML_Store_SQL extends SimpleSAML_Store {
*/
private function cleanKVStore() {
- SimpleSAML_Logger::debug('store.sql: Cleaning key-value store.');
+ SimpleSAML\Logger::debug('store.sql: Cleaning key-value store.');
$query = 'DELETE FROM ' . $this->prefix . '_kvstore WHERE _expire < :now';
$params = array('now' => gmdate('Y-m-d H:i:s'));
diff --git a/lib/SimpleSAML/Utilities.php b/lib/SimpleSAML/Utilities.php
index d0e33ee4a..e0f0754d0 100644
--- a/lib/SimpleSAML/Utilities.php
+++ b/lib/SimpleSAML/Utilities.php
@@ -13,7 +13,7 @@ class SimpleSAML_Utilities
{
/**
- * @deprecated This property will be removed in SSP 2.0. Please use SimpleSAML_Logger::isErrorMasked() instead.
+ * @deprecated This property will be removed in SSP 2.0. Please use SimpleSAML\Logger::isErrorMasked() instead.
*/
public static $logMask = 0;
@@ -213,7 +213,7 @@ class SimpleSAML_Utilities
}
if (strlen($url) > 2048) {
- SimpleSAML_Logger::warning('Redirecting to a URL longer than 2048 bytes.');
+ SimpleSAML\Logger::warning('Redirecting to a URL longer than 2048 bytes.');
}
// Set the location header
@@ -571,7 +571,7 @@ class SimpleSAML_Utilities
$redirInfo = base64_encode(SimpleSAML\Utils\Crypto::aesEncrypt($session->getSessionId().':'.$postId));
- $url = SimpleSAML_Module::getModuleURL('core/postredirect.php', array('RedirInfo' => $redirInfo));
+ $url = SimpleSAML\Module::getModuleURL('core/postredirect.php', array('RedirInfo' => $redirInfo));
$url = preg_replace("#^https:#", "http:", $url);
return $url;
@@ -615,20 +615,20 @@ class SimpleSAML_Utilities
/**
- * @deprecated This method will be removed in SSP 2.0. Please use SimpleSAML_Logger::maskErrors() instead.
+ * @deprecated This method will be removed in SSP 2.0. Please use SimpleSAML\Logger::maskErrors() instead.
*/
public static function maskErrors($mask)
{
- SimpleSAML_Logger::maskErrors($mask);
+ SimpleSAML\Logger::maskErrors($mask);
}
/**
- * @deprecated This method will be removed in SSP 2.0. Please use SimpleSAML_Logger::popErrorMask() instead.
+ * @deprecated This method will be removed in SSP 2.0. Please use SimpleSAML\Logger::popErrorMask() instead.
*/
public static function popErrorMask()
{
- SimpleSAML_Logger::popErrorMask();
+ SimpleSAML\Logger::popErrorMask();
}
diff --git a/lib/SimpleSAML/Utils/Config/Metadata.php b/lib/SimpleSAML/Utils/Config/Metadata.php
index 1615ef64b..d9f932835 100644
--- a/lib/SimpleSAML/Utils/Config/Metadata.php
+++ b/lib/SimpleSAML/Utils/Config/Metadata.php
@@ -257,9 +257,9 @@ class Metadata
*/
public static function isHiddenFromDiscovery(array $metadata)
{
- \SimpleSAML_Logger::maskErrors(E_ALL);
+ \SimpleSAML\Logger::maskErrors(E_ALL);
$hidden = in_array(self::$HIDE_FROM_DISCOVERY, $metadata['EntityAttributes'][self::$ENTITY_CATEGORY]);
- \SimpleSAML_Logger::popErrorMask();
+ \SimpleSAML\Logger::popErrorMask();
if (is_bool($hidden)) {
return $hidden;
}
diff --git a/lib/SimpleSAML/XHTML/EMail.php b/lib/SimpleSAML/XHTML/EMail.php
index b4b5ef02a..335df2bf4 100644
--- a/lib/SimpleSAML/XHTML/EMail.php
+++ b/lib/SimpleSAML/XHTML/EMail.php
@@ -92,7 +92,7 @@ Content-Transfer-Encoding: 8bit
$headers = implode("\n", $this->headers);
$mail_sent = @mail($this->to, $this->subject, $message, $headers);
- SimpleSAML_Logger::debug('Email: Sending e-mail to [' . $this->to . '] : ' . ($mail_sent ? 'OK' : 'Failed'));
+ SimpleSAML\Logger::debug('Email: Sending e-mail to [' . $this->to . '] : ' . ($mail_sent ? 'OK' : 'Failed'));
if (!$mail_sent) throw new Exception('Error when sending e-mail');
}
diff --git a/lib/SimpleSAML/XHTML/IdPDisco.php b/lib/SimpleSAML/XHTML/IdPDisco.php
index 065e2e50d..a71193e86 100644
--- a/lib/SimpleSAML/XHTML/IdPDisco.php
+++ b/lib/SimpleSAML/XHTML/IdPDisco.php
@@ -175,7 +175,7 @@ class SimpleSAML_XHTML_IdPDisco
*/
protected function log($message)
{
- SimpleSAML_Logger::info('idpDisco.'.$this->instance.': '.$message);
+ SimpleSAML\Logger::info('idpDisco.'.$this->instance.': '.$message);
}
diff --git a/lib/SimpleSAML/XML/Validator.php b/lib/SimpleSAML/XML/Validator.php
index 555578600..545f3dfc4 100644
--- a/lib/SimpleSAML/XML/Validator.php
+++ b/lib/SimpleSAML/XML/Validator.php
@@ -401,22 +401,22 @@ class SimpleSAML_XML_Validator {
throw new Exception('Could not load CA file: ' . $caFile);
}
- SimpleSAML_Logger::debug('Validating certificate against CA file: ' . var_export($caFile, TRUE));
+ SimpleSAML\Logger::debug('Validating certificate against CA file: ' . var_export($caFile, TRUE));
$resBuiltin = self::validateCABuiltIn($certificate, $caFile);
if ($resBuiltin !== TRUE) {
- SimpleSAML_Logger::debug('Failed to validate with internal function: ' . var_export($resBuiltin, TRUE));
+ SimpleSAML\Logger::debug('Failed to validate with internal function: ' . var_export($resBuiltin, TRUE));
$resExternal = self::validateCAExec($certificate, $caFile);
if ($resExternal !== TRUE) {
- SimpleSAML_Logger::debug('Failed to validate with external function: ' . var_export($resExternal, TRUE));
+ SimpleSAML\Logger::debug('Failed to validate with external function: ' . var_export($resExternal, TRUE));
throw new Exception('Could not verify certificate against CA file "'
. $caFile . '". Internal result:' . $resBuiltin .
' External result:' . $resExternal);
}
}
- SimpleSAML_Logger::debug('Successfully validated certificate.');
+ SimpleSAML\Logger::debug('Successfully validated certificate.');
}
}
--
GitLab