summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/SimpleSAML/Auth/Source.php27
-rw-r--r--modules/multiauth/www/selectsource.php4
-rw-r--r--modules/saml/lib/Auth/Source/SP.php4
-rw-r--r--modules/saml/www/sp/saml2-acs.php4
4 files changed, 22 insertions, 17 deletions
diff --git a/lib/SimpleSAML/Auth/Source.php b/lib/SimpleSAML/Auth/Source.php
index 9009fb1..b9cceb4 100644
--- a/lib/SimpleSAML/Auth/Source.php
+++ b/lib/SimpleSAML/Auth/Source.php
@@ -166,18 +166,23 @@ abstract class SimpleSAML_Auth_Source
assert('is_string($errorURL) || is_null($errorURL)');
$state = array_merge($params, array(
- 'SimpleSAML_Auth_Default.id' => $this->authId,
- 'SimpleSAML_Auth_Default.Return' => $return,
- 'SimpleSAML_Auth_Default.ErrorURL' => $errorURL,
+ 'SimpleSAML_Auth_Default.id' => $this->authId, // TODO: remove in 2.0
+ 'SimpleSAML_Auth_Source.id' => $this->authId,
+ 'SimpleSAML_Auth_Default.Return' => $return, // TODO: remove in 2.0
+ 'SimpleSAML_Auth_Source.Return' => $return,
+ 'SimpleSAML_Auth_Default.ErrorURL' => $errorURL, // TODO: remove in 2.0
+ 'SimpleSAML_Auth_Source.ErrorURL' => $errorURL,
'LoginCompletedHandler' => array(get_class(), 'loginCompleted'),
'LogoutCallback' => array(get_class(), 'logoutCallback'),
'LogoutCallbackState' => array(
- 'SimpleSAML_Auth_Default.logoutSource' => $this->authId,
+ 'SimpleSAML_Auth_Default.logoutSource' => $this->authId, // TODO: remove in 2.0
+ 'SimpleSAML_Auth_Source.logoutSource' => $this->authId,
),
));
if (is_string($return)) {
- $state['SimpleSAML_Auth_Default.ReturnURL'] = $return;
+ $state['SimpleSAML_Auth_Default.ReturnURL'] = $return; // TODO: remove in 2.0
+ $state['SimpleSAML_Auth_Source.ReturnURL'] = $return;
}
if ($errorURL !== null) {
@@ -206,16 +211,16 @@ abstract class SimpleSAML_Auth_Source
public static function loginCompleted($state)
{
assert('is_array($state)');
- assert('array_key_exists("SimpleSAML_Auth_Default.Return", $state)');
- assert('array_key_exists("SimpleSAML_Auth_Default.id", $state)');
+ assert('array_key_exists("SimpleSAML_Auth_Source.Return", $state)');
+ assert('array_key_exists("SimpleSAML_Auth_Source.id", $state)');
assert('array_key_exists("Attributes", $state)');
assert('!array_key_exists("LogoutState", $state) || is_array($state["LogoutState"])');
- $return = $state['SimpleSAML_Auth_Default.Return'];
+ $return = $state['SimpleSAML_Auth_Source.Return'];
// save session state
$session = SimpleSAML_Session::getSessionFromRequest();
- $authId = $state['SimpleSAML_Auth_Default.id'];
+ $authId = $state['SimpleSAML_Auth_Source.id'];
$session->doLogin($authId, SimpleSAML_Auth_State::getPersistentAuthData($state));
if (is_string($return)) { // redirect...
@@ -358,9 +363,9 @@ abstract class SimpleSAML_Auth_Source
public static function logoutCallback($state)
{
assert('is_array($state)');
- assert('array_key_exists("SimpleSAML_Auth_Default.logoutSource", $state)');
+ assert('array_key_exists("SimpleSAML_Auth_Source.logoutSource", $state)');
- $source = $state['SimpleSAML_Auth_Default.logoutSource'];
+ $source = $state['SimpleSAML_Auth_Source.logoutSource'];
$session = SimpleSAML_Session::getSessionFromRequest();
if (!$session->isValid($source)) {
diff --git a/modules/multiauth/www/selectsource.php b/modules/multiauth/www/selectsource.php
index 8881d86..2511957 100644
--- a/modules/multiauth/www/selectsource.php
+++ b/modules/multiauth/www/selectsource.php
@@ -17,8 +17,8 @@ if (!array_key_exists('AuthState', $_REQUEST)) {
$authStateId = $_REQUEST['AuthState'];
$state = SimpleSAML_Auth_State::loadState($authStateId, sspmod_multiauth_Auth_Source_MultiAuth::STAGEID);
-if (array_key_exists("SimpleSAML_Auth_Default.id", $state)) {
- $authId = $state["SimpleSAML_Auth_Default.id"];
+if (array_key_exists("SimpleSAML_Auth_Source.id", $state)) {
+ $authId = $state["SimpleSAML_Auth_Source.id"];
$as = SimpleSAML_Auth_Source::getById($authId);
} else {
$as = NULL;
diff --git a/modules/saml/lib/Auth/Source/SP.php b/modules/saml/lib/Auth/Source/SP.php
index 1411b05..1747ffe 100644
--- a/modules/saml/lib/Auth/Source/SP.php
+++ b/modules/saml/lib/Auth/Source/SP.php
@@ -188,8 +188,8 @@ class sspmod_saml_Auth_Source_SP extends SimpleSAML_Auth_Source {
$ar->setAssertionConsumerServiceURL(SimpleSAML_Module::getModuleURL('saml/sp/saml2-acs.php/' . $this->authId));
- if (isset($state['SimpleSAML_Auth_Default.ReturnURL'])) {
- $ar->setRelayState($state['SimpleSAML_Auth_Default.ReturnURL']);
+ if (isset($state['SimpleSAML_Auth_Source.ReturnURL'])) {
+ $ar->setRelayState($state['SimpleSAML_Auth_Source.ReturnURL']);
}
if (isset($state['saml:AuthnContextClassRef'])) {
diff --git a/modules/saml/www/sp/saml2-acs.php b/modules/saml/www/sp/saml2-acs.php
index 624f7cc..26e8ceb 100644
--- a/modules/saml/www/sp/saml2-acs.php
+++ b/modules/saml/www/sp/saml2-acs.php
@@ -217,8 +217,8 @@ $state['saml:sp:prevAuth'] = array(
'id' => $response->getId(),
'issuer' => $idp,
);
-if (isset($state['SimpleSAML_Auth_Default.ReturnURL'])) {
- $state['saml:sp:prevAuth']['redirect'] = $state['SimpleSAML_Auth_Default.ReturnURL'];
+if (isset($state['SimpleSAML_Auth_Source.ReturnURL'])) {
+ $state['saml:sp:prevAuth']['redirect'] = $state['SimpleSAML_Auth_Source.ReturnURL'];
} elseif (isset($state['saml:sp:RelayState'])) {
$state['saml:sp:prevAuth']['redirect'] = $state['saml:sp:RelayState'];
}