completed the update to follow changes in saml2.client

This commit is contained in:
Roland Hedberg
2009-11-20 14:30:18 +01:00
parent 2c947c4adf
commit 9097316eda

View File

@@ -55,21 +55,18 @@ class AttributeResolver(object):
:return: A dictionary with all the collected information about the :return: A dictionary with all the collected information about the
subject subject
""" """
extended_identity = {} result = []
for member in vo_members: for member in vo_members:
for ass in self.metadata.attribute_services(member): for ass in self.metadata.attribute_services(member):
for attr_serv in ass.attribute_service: for attr_serv in ass.attribute_service:
log and log.info("Send attribute request to %s" % \ log and log.info("Send attribute request to %s" % \
attr_serv.location) attr_serv.location)
(resp, issuer, session_info = self.saml2client.attribute_query(
not_on_or_after) = self.saml2client.attribute_query(
subject_id, subject_id,
issuer, issuer,
attr_serv.location, attr_serv.location,
sp_name_qualifier=sp_name_qualifier, sp_name_qualifier=sp_name_qualifier,
format=name_id_format, log=log) format=name_id_format, log=log)
if resp: if session_info:
# unnecessary result.append(session_info)
del resp["__userid"] return result
extended_identity[issuer] = (not_on_or_after, resp)
return extended_identity