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

SAML2_AuthnRequest: Add support for AssertionConsumerServiceIndex.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2751 44740490-163a-0410-bde0-09ae8108e29a
parent c65dba2f
No related branches found
No related tags found
No related merge requests found
...@@ -68,6 +68,14 @@ class SAML2_AuthnRequest extends SAML2_Request { ...@@ -68,6 +68,14 @@ class SAML2_AuthnRequest extends SAML2_Request {
private $protocolBinding; private $protocolBinding;
/**
* The index of the AssertionConsumerService.
*
* @var int|NULL
*/
private $assertionConsumerServiceIndex;
/** /**
* What authentication context was requested. * What authentication context was requested.
* *
...@@ -113,6 +121,10 @@ class SAML2_AuthnRequest extends SAML2_Request { ...@@ -113,6 +121,10 @@ class SAML2_AuthnRequest extends SAML2_Request {
$this->protocolBinding = $xml->getAttribute('ProtocolBinding'); $this->protocolBinding = $xml->getAttribute('ProtocolBinding');
} }
if ($xml->hasAttribute('AssertionConsumerServiceIndex')) {
$this->assertionConsumerServiceIndex = (int)$xml->getAttribute('AssertionConsumerServiceIndex');
}
$nameIdPolicy = SAML2_Utils::xpQuery($xml, './saml_protocol:NameIDPolicy'); $nameIdPolicy = SAML2_Utils::xpQuery($xml, './saml_protocol:NameIDPolicy');
if (!empty($nameIdPolicy)) { if (!empty($nameIdPolicy)) {
...@@ -332,6 +344,28 @@ class SAML2_AuthnRequest extends SAML2_Request { ...@@ -332,6 +344,28 @@ class SAML2_AuthnRequest extends SAML2_Request {
} }
/**
* Retrieve the value of the AssertionConsumerServiceIndex attribute.
*
* @return int|NULL The AssertionConsumerServiceIndex attribute.
*/
public function getAssertionConsumerServiceIndex() {
return $this->assertionConsumerServiceIndex;
}
/**
* Set the value of the AssertionConsumerServiceIndex attribute.
*
* @param string|NULL $assertionConsumerServiceIndex The AssertionConsumerServiceIndex attribute.
*/
public function setAssertionConsumerServiceIndex($assertionConsumerServiceIndex) {
assert('is_int($assertionConsumerServiceIndex) || is_null($assertionConsumerServiceIndex)');
$this->assertionConsumerServiceIndex = $assertionConsumerServiceIndex;
}
/** /**
* Retrieve the RequestedAuthnContext. * Retrieve the RequestedAuthnContext.
* *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment