Skip to content
Snippets Groups Projects
Commit 35e86bed authored by Andjelko Horvat's avatar Andjelko Horvat
Browse files

saml/SP: support for samlp:Extensions.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2868 44740490-163a-0410-bde0-09ae8108e29a
parent 3bf933e3
No related branches found
No related tags found
No related merge requests found
......@@ -461,6 +461,9 @@ class SAML2_AuthnRequest extends SAML2_Request {
}
}
if (!empty($this->extensions)) {
SAML2_XML_samlp_Extensions::addList($root, $this->extensions);
}
if ($this->ProxyCount !== null || count($this->IDPList) > 0 || count($this->RequesterID) > 0) {
$scoping = $this->document->createElementNS(SAML2_Const::NS_SAMLP, 'Scoping');
......
......@@ -41,6 +41,11 @@ All these parameters override the equivalent option from the configuration.
: *Note*: SAML 2 specific.
`saml:Extensions`
: The samlp:Extensions that will be sent in the login request.
: *Note*: SAML 2 specific.
Authentication data
-------------------
......@@ -107,6 +112,17 @@ Here we will list some examples for this authentication source.
'saml:AuthnContextClassRef' => 'urn:oasis:names:tc:SAML:2.0:ac:classes:Password',
));
### Using samlp:Extensions
$dom = new DOMDocument();
$ce = $dom->createElementNS('http://www.example.com/XFoo', 'xfoo:test', 'Test data!');
ext[] = new SAML2_XML_Chunk($ce);
$auth = new SimpleSAML_Auth_Simple('default-sp');
$auth->login(array(
'saml:Extensions' => $ext,
));
Options
-------
......
......@@ -248,6 +248,10 @@ class sspmod_saml_Auth_Source_SP extends SimpleSAML_Auth_Source {
$ar->setRequesterID($requesterID);
if (isset($state['saml:Extensions'])) {
$ar->setExtensions($state['saml:Extensions']);
}
$id = SimpleSAML_Auth_State::saveState($state, 'saml:sp:sso', TRUE);
$ar->setId($id);
......
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