Skip to content

Commit e1432e0

Browse files
author
Roland Hedberg
committed
Fixed some problems with Discovery Server
1 parent f4abf8d commit e1432e0

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/saml2/discovery.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
from six.moves.urllib.parse import urlencode, parse_qs, urlparse
1+
from future.backports.urllib.parse import parse_qs
2+
from future.backports.urllib.parse import urlencode
3+
from future.backports.urllib.parse import urlparse
4+
25
from saml2.entity import Entity
36
from saml2.response import VerificationError
47

@@ -9,7 +12,8 @@
912

1013
class DiscoveryServer(Entity):
1114
def __init__(self, config=None, config_file=""):
12-
Entity.__init__(self, "disco", config, config_file)
15+
if config or config_file:
16+
Entity.__init__(self, "disco", config, config_file)
1317

1418
def parse_discovery_service_request(self, url="", query=""):
1519
if url:
@@ -22,7 +26,8 @@ def parse_discovery_service_request(self, url="", query=""):
2226

2327
# verify
2428

25-
for key in ["isPassive", "return", "returnIDParam", "policy"]:
29+
for key in ["isPassive", "return", "returnIDParam", "policy",
30+
'entityID']:
2631
try:
2732
assert len(dsr[key]) == 1
2833
dsr[key] = dsr[key][0]

0 commit comments

Comments
 (0)