File: get_attributes_from_assertion.php

package info (click to toggle)
lasso 2.9.0-3
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 21,528 kB
  • sloc: ansic: 38,474; xml: 23,942; python: 5,305; sh: 5,220; makefile: 1,003; php: 495; perl: 117
file content (11 lines) | stat: -rw-r--r-- 393 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
/* Example SP PHP5 code to get attributes from an assertion */

foreach ($assertion->attributeStatement[0]->attribute as $attribute) {
    if ($attribute->name == LASSO_SAML2_ATTRIBUTE_NAME_EPR) {
        continue;
    }
    echo 'attribute : ' . $attribute->name . "\n";
    foreach ($attribute->attributeValue as $value) {
        echo '  value : ' . $value->any[0]->content . "\n";
    }
}