@@ -282,7 +282,8 @@ def _authn_response(self, in_response_to, consumer_url,
282
282
sp_entity_id , identity = None , name_id = None ,
283
283
status = None , authn = None , issuer = None , policy = None ,
284
284
sign_assertion = False , sign_response = False ,
285
- best_effort = False , encrypt_assertion = False , encrypt_cert = None ):
285
+ best_effort = False , encrypt_assertion = False ,
286
+ encrypt_cert = None , authn_statement = None ):
286
287
""" Create a response. A layer of indirection.
287
288
288
289
:param in_response_to: The session identifier of the request
@@ -328,6 +329,12 @@ def _authn_response(self, in_response_to, consumer_url,
328
329
self .config .attribute_converters ,
329
330
policy , issuer = _issuer ,
330
331
** authn_args )
332
+ elif authn_statement : # Got a complete AuthnStatement
333
+ assertion = ast .construct (sp_entity_id , in_response_to ,
334
+ consumer_url , name_id ,
335
+ self .config .attribute_converters ,
336
+ policy , issuer = _issuer ,
337
+ authn_statem = authn_statement )
331
338
else :
332
339
assertion = ast .construct (sp_entity_id , in_response_to ,
333
340
consumer_url , name_id ,
@@ -427,7 +434,8 @@ def create_attribute_response(self, identity, in_response_to, destination,
427
434
def create_authn_response (self , identity , in_response_to , destination ,
428
435
sp_entity_id , name_id_policy = None , userid = None ,
429
436
name_id = None , authn = None , issuer = None ,
430
- sign_response = None , sign_assertion = None , encrypt_cert = None , encrypt_assertion = None ,
437
+ sign_response = None , sign_assertion = None ,
438
+ encrypt_cert = None , encrypt_assertion = None ,
431
439
** kwargs ):
432
440
""" Constructs an AuthenticationResponse
433
441
0 commit comments