Add more debugging trace at level 1
This commit is contained in:
parent
5107fe87d2
commit
5e34027fcd
|
@ -18,13 +18,13 @@ class LassoSPKitAutoPersistentSession extends LassoSPKitDummySession {
|
|||
function findFederation($nameID) {
|
||||
$federation = null;
|
||||
if ($nameID) {
|
||||
#lassospkit_debuglog("looking for session using nameID from profile: $nameID");
|
||||
lassospkit_debuglog("looking for session using nameID from profile: $nameID", 1);
|
||||
$federation = $this->storage->get($nameID);
|
||||
}
|
||||
if (! $federation) {
|
||||
$userID = LassoSPKitUtilsSession::getUserID();
|
||||
if ($userID) {
|
||||
#lassospkit_debuglog("looking for session using userID: $userID");
|
||||
lassospkit_debuglog("looking for session using userID: $userID", 1);
|
||||
$federation = $this->storage->get(md5($userID));
|
||||
}
|
||||
}
|
||||
|
@ -32,13 +32,13 @@ class LassoSPKitAutoPersistentSession extends LassoSPKitDummySession {
|
|||
$nameIDs = LassoSPKitUtilsSession::getNameID();
|
||||
if (is_array($nameIDs)) {
|
||||
foreach (LassoSPKitUtilsSession::getNameID() as $nameID) {
|
||||
#lassospkit_debuglog("looking for session using nameID in session: $userID");
|
||||
lassospkit_debuglog("looking for session using nameID in session: $userID", 1);
|
||||
$federation = $this->storage->get($nameID);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($federation == null) {
|
||||
#lassospkit_debuglog('did not found any session file...');
|
||||
lassospkit_debuglog('did not found any session file...', 1);
|
||||
return 0;
|
||||
}
|
||||
$this->explodeFederation($federation);
|
||||
|
|
|
@ -101,7 +101,7 @@ class LassoSPKitEndpoint extends LassoSPKitUrlDispatch {
|
|||
$profile = $this->getProfileObject();
|
||||
$ret = $profile->processSOAPRequestSLO();
|
||||
} catch (LassoError $e) {
|
||||
lassospkit_debuglog('Critical error: ' . $e);
|
||||
lassospkit_debuglog('Critical error: ' . $e, 1);
|
||||
$ret = $e->getCode();
|
||||
} catch (Exception $e) {
|
||||
$ret = -1;
|
||||
|
|
|
@ -51,7 +51,7 @@ class LassoSPKitFileStore implements LassoSPKitStore {
|
|||
}
|
||||
function debug($ret, $mesg) {
|
||||
if ($ret === FALSE) {
|
||||
#lassospkit_debuglog("SPKit File Storage: " . $mesg);
|
||||
lassospkit_debuglog("SPKit File Storage: " . $mesg, 1);
|
||||
}
|
||||
}
|
||||
function linkcount($key) {
|
||||
|
|
|
@ -17,7 +17,7 @@ class LassoSPKitGenericSession {
|
|||
header("Location: $url");
|
||||
}
|
||||
function doResponse($mimeType, $content) {
|
||||
#lassospkit_debuglog("Renvoi la réponse de type $mimeType et contenu $content");
|
||||
lassospkit_debuglog("Renvoi la réponse de type $mimeType et contenu $content", 1);
|
||||
header("Content-type: $mimeType");
|
||||
echo $content;
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ class LassoSPKitGenericSession {
|
|||
function explodeFederationBlob($blob) {
|
||||
$federation = @unserialize($blob);
|
||||
if ($federation === FALSE) {
|
||||
#lassospkit_debuglog("LassoSPKitGenericSession: cannot deserialize the federation blob");
|
||||
lassospkit_debuglog("LassoSPKitGenericSession: cannot deserialize the federation blob", 1);
|
||||
return 0;
|
||||
}
|
||||
$this->explodeFederation($federation);
|
||||
|
|
|
@ -17,7 +17,7 @@ class LassoSPKitHelper {
|
|||
$profile->setSessionFromDump($sessionDump);
|
||||
}
|
||||
if ($identityDump) {
|
||||
#lassospkit_debuglog("load dump " . $identityDump);
|
||||
lassospkit_debuglog("load dump " . $identityDump, 1);
|
||||
$profile->setIdentityFromDump($identityDump);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ class LassoSPKitSaml2 extends LassoSPKitSAMLCommon {
|
|||
'isPassive' => FALSE);
|
||||
$params = array_merge($default_params, $params);
|
||||
extract($params);
|
||||
#lassospkit_debuglog("Params isPassive: $isPassive allowCreate: $allowCreate format: $nameIDFormat");
|
||||
lassospkit_debuglog("Params isPassive: $isPassive allowCreate: $allowCreate format: $nameIDFormat", 1);
|
||||
$login = null;
|
||||
return parent::ssoCommon($login, $remoteID, $method, $isConsentObtained, $forceAuthn, $isPassive, $relayState, array('nameIDFormat'=>$nameIDFormat, 'allowCreate' => $allowCreate));
|
||||
}
|
||||
|
|
|
@ -44,10 +44,10 @@ class LassoSPKitSaml2Endpoint extends LassoSPKitEndpoint {
|
|||
$profile = $this->getProfileObject();
|
||||
$ret = $profile->processSOAPRequestNameIdManagement();
|
||||
} catch (LassoError $e) {
|
||||
lassospkit_debuglog('Critical error: ' . $e);
|
||||
lassospkit_debuglog('Critical error: ' . $e, 1);
|
||||
$ret = $e->getCode();
|
||||
} catch (Exception $e) {
|
||||
lassospkit_debuglog('Unkown exception error: ' . $e);
|
||||
lassospkit_debuglog('Unkown exception error: ' . $e, 1);
|
||||
$ret = -1;
|
||||
}
|
||||
return $this->handleNameIdManagement($ret);
|
||||
|
|
|
@ -12,11 +12,11 @@ class LassoSPKitSessionMemCache {
|
|||
function retrieve($session, $timeout) {
|
||||
$LassoSPKitSessionMemCache_cookiename = 'lassospkit_memcache_' . LassoSPKitConfig::get('cookiename');
|
||||
|
||||
#lassospkit_debuglog("Retrieving $LassoSPKitSessionMemCache_cookiename : " . var_export($_COOKIE, 1));
|
||||
lassospkit_debuglog("Retrieving $LassoSPKitSessionMemCache_cookiename : " . var_export($_COOKIE, 1), 1);
|
||||
$content = null;
|
||||
if (isset($_COOKIE[$LassoSPKitSessionMemCache_cookiename])) {
|
||||
$session->id = $_COOKIE[$LassoSPKitSessionMemCache_cookiename];
|
||||
#lassospkit_debuglog("Retrieving " . $session->id);
|
||||
lassospkit_debuglog("Retrieving " . $session->id, 1);
|
||||
$valid = ereg("^[[:alnum:]]+$",$session->id);
|
||||
if ($valid) {
|
||||
$memcache_key = self::getkey($session);
|
||||
|
|
|
@ -69,7 +69,7 @@ class LassoSPKitUtilsSession {
|
|||
# $content = LassoSPKitSessionFile::retrieve($this, self::$timeout);
|
||||
# }
|
||||
$content = self::$storage->retrieve($this, self::$timeout);
|
||||
#lassospkit_debuglog("Session construct $content");
|
||||
lassospkit_debuglog("Session construct $content", 1);
|
||||
if ($content) {
|
||||
$t = @unserialize($content);
|
||||
if ($t && is_array($t)) {
|
||||
|
@ -91,7 +91,7 @@ class LassoSPKitUtilsSession {
|
|||
}
|
||||
$content = serialize($this->vars);
|
||||
self::$storage->store($this, $content);
|
||||
#lassospkit_debuglog("Session store $content");
|
||||
lassospkit_debuglog("Session store $content", 1);
|
||||
# if (self::$use_session) {
|
||||
# LassoSPKitSessionPHP::store($this, $content);
|
||||
# } else {
|
||||
|
|
Reference in New Issue