Files
deb-python-pysaml2/tests/localhost.py
rmokiem-topdesk 367d2d65f3 - Fixed some warnings (mostly unused variables)
- Fixed all PEP-8 problems I could find using Eclipse's built-in PEP-8
validator (except the basic attributemap which would become unreadable)
2014-02-19 15:32:49 +01:00

69 lines
1.6 KiB
Python
Executable File

#!/usr/bin/env python
from saml2.saml import NAME_FORMAT_URI
from saml2test import JSON_DUMPS_ARGS
__author__ = 'rolandh'
import json
BASE = "http://localhost:8088"
metadata = open("idp_test/idp.xml").read()
info = {
"entity_id": "%s/idp.xml" % BASE,
"interaction": [
{
"matches": {
"url": "%s/login" % BASE,
"title": 'IDP test login'
},
"page-type": "login",
"control": {
"type": "form",
"set": {"login": "roland", "password": "dianakra"}
}
},
{
"matches": {
"url": "%s/sso/redirect" % BASE,
"title": "SAML 2.0 POST"
},
"page-type": "other",
"control": {
"index": 0,
"type": "form",
"set": {}
}
},
{
"matches": {
"url": "%s/sso/post" % BASE,
"title": "SAML 2.0 POST"
},
"page-type": "other",
"control": {
"index": 0,
"type": "form",
"set": {}
}
},
{
"matches": {
"url": "%s/slo/post" % BASE,
"title": "SAML 2.0 POST"
},
"page-type": "other",
"control": {
"index": 0,
"type": "form",
"set": {}
}
}
],
"metadata": metadata,
"name_format": NAME_FORMAT_URI
}
print json.dumps(info, **JSON_DUMPS_ARGS)