File: get_attributes_from_assertion.php

package info (click to toggle)
lasso 2.4.1-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 25,856 kB
  • ctags: 14,480
  • sloc: ansic: 66,107; xml: 23,958; sh: 11,365; python: 7,474; makefile: 1,526; java: 444; php: 325; perl: 117
file content (11 lines) | stat: -rw-r--r-- 393 bytes parent folder | download | duplicates (18)
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";
    }
}