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

SAMLParser: Extract name and description from SP metadata.

This patch extracts the name and description of the SP from the
AttributeConsumingService element in the metadata.

Patch by gyufii (http://code.google.com/u/gyufii/), attached to
issue 252.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2073 44740490-163a-0410-bde0-09ae8108e29a
parent 430d2ecb
No related branches found
No related tags found
No related merge requests found
......@@ -520,6 +520,14 @@ class SimpleSAML_Metadata_SAMLParser {
$ret['attributes'] = $spd['attributes'];
}
/* Add name & description. */
if (array_key_exists('name', $spd)) {
$ret['name'] = $spd['name'];
}
if (array_key_exists('description', $spd)) {
$ret['description'] = $spd['description'];
}
/* Add certificate data. Only the first valid certificate will be added. */
foreach($spd['keys'] as $key) {
if($key['type'] !== 'X509Certificate') {
......@@ -661,6 +669,14 @@ class SimpleSAML_Metadata_SAMLParser {
$ret['attributes'] = $spd['attributes'];
}
/* Add name & description. */
if (array_key_exists('name', $spd)) {
$ret['name'] = $spd['name'];
}
if (array_key_exists('description', $spd)) {
$ret['description'] = $spd['description'];
}
/* Add certificate data. Only the first valid certificate will be added. */
foreach($spd['keys'] as $key) {
if($key['type'] !== 'X509Certificate') {
......
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