Skip to content

Commit 622eb6c

Browse files
author
Roland Hedberg
committed
Merge branch 'master' of github.com:rohe/pysaml2
2 parents 3ec5e13 + e079a53 commit 622eb6c

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/saml2/attribute_converter.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def adjust(self):
286286
[(value.lower(), key) for key, value in self._to.items()])
287287
if self._to is None and self.fro is not None:
288288
self._to = dict(
289-
[(value.lower, key) for key, value in self._fro.items()])
289+
[(value.lower(), key) for key, value in self._fro.items()])
290290

291291
def from_dict(self, mapdict):
292292
""" Import the attribute map from a dictionary

src/saml2/metadata.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ def do_uiinfo(_uiinfo):
312312
except KeyError:
313313
pass
314314
else:
315-
raise SAMLError("Configuration error: ui_info logo")
315+
raise SAMLError("Configuration error: ui_info keywords")
316316
inst.append(keyw)
317317
elif isinstance(val, dict):
318318
keyw = mdui.Keywords()
@@ -323,7 +323,7 @@ def do_uiinfo(_uiinfo):
323323
pass
324324
inst.append(keyw)
325325
else:
326-
raise SAMLError("Configuration Error: ui_info logo")
326+
raise SAMLError("Configuration Error: ui_info keywords")
327327
except KeyError:
328328
pass
329329

@@ -416,7 +416,7 @@ def do_endpoints(conf, endpoints):
416416
if isinstance(args, basestring): # Assume it's the location
417417
args = {"location": args,
418418
"binding": DEFAULT_BINDING[endpoint]}
419-
elif isinstance(args, tuple):
419+
elif isinstance(args, tuple) or isinstance(args, list):
420420
if len(args) == 2: # (location, binding)
421421
args = {"location": args[0], "binding": args[1]}
422422
elif len(args) == 3: # (location, binding, index)
@@ -530,6 +530,12 @@ def do_spsso_descriptor(conf, cert=None):
530530
for val in vals:
531531
spsso.extensions.add_extension_element(val)
532532

533+
ui_info = conf.getattr("ui_info", "sp")
534+
if ui_info:
535+
if spsso.extensions is None:
536+
spsso.extensions = md.Extensions()
537+
spsso.extensions.add_extension_element(do_uiinfo(ui_info))
538+
533539
if cert:
534540
encryption_type = conf.encryption_type
535541
spsso.key_descriptor = do_key_descriptor(cert, encryption_type)

0 commit comments

Comments
 (0)