Skip to content
Snippets Groups Projects
Commit c304c3d5 authored by Olav Morken's avatar Olav Morken
Browse files

core:UserPassOrgBase: Add selected organization to auth data.

Thanks to Ryan Panning for implementing this!

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2992 44740490-163a-0410-bde0-09ae8108e29a
parent e6aa919b
No related branches found
No related tags found
No related merge requests found
...@@ -27,6 +27,12 @@ abstract class sspmod_core_Auth_UserPassOrgBase extends SimpleSAML_Auth_Source { ...@@ -27,6 +27,12 @@ abstract class sspmod_core_Auth_UserPassOrgBase extends SimpleSAML_Auth_Source {
const AUTHID = 'sspmod_core_Auth_UserPassOrgBase.AuthId'; const AUTHID = 'sspmod_core_Auth_UserPassOrgBase.AuthId';
/**
* The key of the OrgId field in the state, identifies which org was selected.
*/
const ORGID = 'sspmod_core_Auth_UserPassOrgBase.SelectedOrg';
/** /**
* What way do we handle the organization as part of the username. * What way do we handle the organization as part of the username.
* Three values: * Three values:
...@@ -194,6 +200,10 @@ abstract class sspmod_core_Auth_UserPassOrgBase extends SimpleSAML_Auth_Source { ...@@ -194,6 +200,10 @@ abstract class sspmod_core_Auth_UserPassOrgBase extends SimpleSAML_Auth_Source {
return $e->getErrorCode(); return $e->getErrorCode();
} }
// Add the selected Org to the state
$state[self::ORGID] = $organization;
$state['PersistentAuthData'][] = self::ORGID;
$state['Attributes'] = $attributes; $state['Attributes'] = $attributes;
SimpleSAML_Auth_Source::completeAuth($state); SimpleSAML_Auth_Source::completeAuth($state);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment