summaryrefslogtreecommitdiffstats
path: root/bindings/php5/examples
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/php5/examples')
-rw-r--r--bindings/php5/examples/get_attributes_from_assertion.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/bindings/php5/examples/get_attributes_from_assertion.php b/bindings/php5/examples/get_attributes_from_assertion.php
new file mode 100644
index 00000000..3ac48159
--- /dev/null
+++ b/bindings/php5/examples/get_attributes_from_assertion.php
@@ -0,0 +1,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";
+ }
+}