File: get_attributes_from_assertion.py

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 (9 lines) | stat: -rw-r--r-- 334 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
# Example SP Python code to get attributes from an assertion


for attribute in assertion.attributeStatement[0].attribute:
    if attribute.name == lasso.SAML2_ATTRIBUTE_NAME_EPR:
        continue
    print('attribute : ' + attribute.name)
    for value in attribute.attributeValue:
        print('  value : ' + value.any[0].content)