Skip to content

Commit f38f1f8

Browse files
author
Roland Hedberg
committed
Added new function and copied identity information so not to mess with any stored information.
1 parent 37f7858 commit f38f1f8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

example/idp2/idp.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ def _expiration(timeout, tformat="%a, %d-%b-%Y %H:%M:%S GMT"):
6161
# validity time should match lifetime of assertions
6262
return time_util.in_a_while(minutes=timeout, format=tformat)
6363

64+
65+
def get_eptid(idp, req_info, session):
66+
return idp.eptid.get(idp.config.entityid,
67+
req_info.sender(), session["permanent_id"],
68+
session["authn_auth"])
69+
6470
# -----------------------------------------------------------------------------
6571

6672

@@ -272,7 +278,8 @@ def do(self, query, binding_in, relay_state=""):
272278
return resp(self.environ, self.start_response)
273279

274280
if not _resp:
275-
identity = USERS[self.user]
281+
identity = USERS[self.user].copy()
282+
#identity["eduPersonTargetedID"] = get_eptid(IDP, query, session)
276283
logger.info("Identity: %s" % (identity,))
277284

278285
if REPOZE_ID_EQUIVALENT:

0 commit comments

Comments
 (0)