Skip to content

Commit 453061c

Browse files
author
Hans Hörberg
committed
Fix so the IdP follows PEFIM.
1 parent f3a5df6 commit 453061c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

example/idp2/idp.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,8 @@ def do(self, query, binding_in, relay_state="", encrypt_cert=None):
335335
_resp = IDP.create_authn_response(
336336
identity, userid=self.user,
337337
encrypt_cert=encrypt_cert,
338+
encrypt_assertion_self_contained=True,
339+
encrypted_advice_attributes=True,
338340
**resp_args)
339341
except Exception as excp:
340342
logging.error(exception_trace(excp))
@@ -399,9 +401,9 @@ def redirect(self):
399401
return resp(self.environ, self.start_response)
400402

401403
if self.user:
404+
saml_msg["req_info"] = self.req_info
402405
if _req.force_authn is not None and \
403406
_req.force_authn.lower() == 'true':
404-
saml_msg["req_info"] = self.req_info
405407
key = self._store_request(saml_msg)
406408
return self.not_authn(key, _req.requested_authn_context)
407409
else:
@@ -1013,6 +1015,7 @@ def application(environ, start_response):
10131015
if isinstance(callback, tuple):
10141016
cls = callback[0](environ, start_response, user)
10151017
func = getattr(cls, callback[1])
1018+
10161019
return func()
10171020
return callback(environ, start_response, user)
10181021

0 commit comments

Comments
 (0)