From b1e6604fdb103601a06b9a09757c71e47368fb24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no> Date: Tue, 15 Apr 2008 10:13:12 +0000 Subject: [PATCH] Create new session at login modules if one does not exists. to get better error messages on timeout on the feide module git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@498 44740490-163a-0410-bde0-09ae8108e29a --- www/auth/login-feide.php | 6 +----- www/auth/login.php | 4 +--- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/www/auth/login-feide.php b/www/auth/login-feide.php index 7b879c458..a388e47df 100644 --- a/www/auth/login-feide.php +++ b/www/auth/login-feide.php @@ -31,7 +31,7 @@ require_once((isset($SIMPLESAML_INCPREFIX)?$SIMPLESAML_INCPREFIX:'') . 'SimpleSA $config = SimpleSAML_Configuration::getInstance(); $ldapconfig = $config->copyFromBase('loginfeide', 'config-login-feide.php'); $metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler(); -$session = SimpleSAML_Session::getInstance(); +$session = SimpleSAML_Session::getInstance(TRUE); SimpleSAML_Logger::info('AUTH - ldap-feide: Accessing auth endpoint login-feide'); @@ -39,10 +39,6 @@ SimpleSAML_Logger::info('AUTH - ldap-feide: Accessing auth endpoint login-feide' $ldaporgconfig = $ldapconfig->getValue('orgldapconfig'); -if (empty($session)) - SimpleSAML_Utilities::fatalError($session->getTrackID(), 'NOSESSION'); - - /* * Load the RelayState argument. The RelayState argument contains the address * we should redirect the user to after a successful authentication. diff --git a/www/auth/login.php b/www/auth/login.php index 900235a77..604c91f65 100644 --- a/www/auth/login.php +++ b/www/auth/login.php @@ -12,7 +12,7 @@ require_once((isset($SIMPLESAML_INCPREFIX)?$SIMPLESAML_INCPREFIX:'') . 'SimpleSA $config = SimpleSAML_Configuration::getInstance(); $metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler(); -$session = SimpleSAML_Session::getInstance(true); +$session = SimpleSAML_Session::getInstance(TRUE); SimpleSAML_Logger::info('AUTH - ldap: Accessing auth endpoint login'); @@ -24,8 +24,6 @@ $error = null; $attributes = array(); $username = null; -if (empty($session)) - SimpleSAML_Utilities::fatalError($session->getTrackID(), 'NOSESSION'); /* Load the RelayState argument. The RelayState argument contains the address * we should redirect the user to after a successful authentication. -- GitLab