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

saml: Allow selecting value for AllowCreate.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2743 44740490-163a-0410-bde0-09ae8108e29a
parent c97f2853
No related branches found
No related tags found
No related merge requests found
...@@ -202,10 +202,17 @@ class sspmod_saml_Auth_Source_SP extends SimpleSAML_Auth_Source { ...@@ -202,10 +202,17 @@ class sspmod_saml_Auth_Source_SP extends SimpleSAML_Auth_Source {
} }
if (isset($state['saml:NameIDPolicy'])) { if (isset($state['saml:NameIDPolicy'])) {
$ar->setNameIdPolicy(array( if (is_string($state['saml:NameIDPolicy'])) {
'Format' => (string)$state['saml:NameIDPolicy'], $policy = array(
'AllowCreate' => TRUE, 'Format' => (string)$state['saml:NameIDPolicy'],
)); 'AllowCreate' => TRUE,
);
} elseif (is_array($state['saml:NameIDPolicy'])) {
$policy = $state['saml:NameIDPolicy'];
} else {
throw new SimpleSAML_Error_Exception('Invalid value of $state[\'saml:NameIDPolicy\'].');
}
$ar->setNameIdPolicy($policy);
} }
if (isset($state['saml:IDPList'])) { if (isset($state['saml:IDPList'])) {
......
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