File: get_attributes_from_assertion.py

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 (8 lines) | stat: -rw-r--r-- 331 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
# 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