File: localhost.py

package info (click to toggle)
python-pysaml2 4.5.0-4%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 27,664 kB
  • sloc: xml: 229,124; python: 61,007; makefile: 160; sh: 107
file content (67 lines) | stat: -rwxr-xr-x 1,576 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/usr/bin/env python
from saml2.saml import NAME_FORMAT_URI

__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))