@@ -69,6 +69,7 @@ def setup_for_authn_req(self, context, idp_conf, sp_conf, nameid_format=None, re
69
69
70
70
base_url = self .construct_base_url_from_entity_id (idp_conf ["entityid" ])
71
71
samlfrontend = SAMLFrontend (lambda ctx , internal_req : (ctx , internal_req ),
72
+ lambda ctx , internal_logout_req : (ctx , internal_logout_req ),
72
73
internal_attributes , config , base_url , "saml_frontend" )
73
74
samlfrontend .register_endpoints (["saml" ])
74
75
@@ -119,7 +120,8 @@ def get_auth_response(self, samlfrontend, context, internal_response, sp_conf, i
119
120
])
120
121
def test_config_error_handling (self , conf ):
121
122
with pytest .raises (ValueError ):
122
- SAMLFrontend (lambda ctx , req : None , INTERNAL_ATTRIBUTES , conf , "base_url" , "saml_frontend" )
123
+ SAMLFrontend (lambda ctx , req : None , lambda ctx , req : None ,
124
+ INTERNAL_ATTRIBUTES , conf , "base_url" , "saml_frontend" )
123
125
124
126
def test_register_endpoints (self , idp_conf ):
125
127
"""
@@ -133,6 +135,7 @@ def get_path_from_url(url):
133
135
134
136
base_url = self .construct_base_url_from_entity_id (idp_conf ["entityid" ])
135
137
samlfrontend = SAMLFrontend (lambda context , internal_req : (context , internal_req ),
138
+ lambda context , internal_logout_req : (context , internal_logout_req ),
136
139
INTERNAL_ATTRIBUTES , config , base_url , "saml_frontend" )
137
140
138
141
providers = ["foo" , "bar" ]
@@ -247,7 +250,7 @@ def test_get_filter_attributes_with_sp_requested_attributes_without_friendlyname
247
250
"eduPersonAffiliation" , "mail" , "displayName" , "sn" ,
248
251
"givenName" ]}} # no op mapping for saml attribute names
249
252
250
- samlfrontend = SAMLFrontend (None , internal_attributes , conf , base_url , "saml_frontend" )
253
+ samlfrontend = SAMLFrontend (None , None , internal_attributes , conf , base_url , "saml_frontend" )
251
254
samlfrontend .register_endpoints (["testprovider" ])
252
255
253
256
internal_req = InternalData (
@@ -357,7 +360,8 @@ def test_sp_metadata_without_uiinfo(self, context, idp_conf, sp_conf):
357
360
358
361
def test_metadata_endpoint (self , context , idp_conf ):
359
362
conf = {"idp_config" : idp_conf , "endpoints" : ENDPOINTS }
360
- samlfrontend = SAMLFrontend (lambda ctx , req : None , INTERNAL_ATTRIBUTES , conf , "base_url" , "saml_frontend" )
363
+ samlfrontend = SAMLFrontend (lambda ctx , req : None , lambda ctx , req : None ,
364
+ INTERNAL_ATTRIBUTES , conf , "base_url" , "saml_frontend" )
361
365
samlfrontend .register_endpoints (["todo" ])
362
366
resp = samlfrontend ._metadata_endpoint (context )
363
367
headers = dict (resp .headers )
@@ -399,7 +403,8 @@ class TestSAMLMirrorFrontend:
399
403
@pytest .fixture (autouse = True )
400
404
def create_frontend (self , idp_conf ):
401
405
conf = {"idp_config" : idp_conf , "endpoints" : ENDPOINTS }
402
- self .frontend = SAMLMirrorFrontend (lambda ctx , req : None , INTERNAL_ATTRIBUTES , conf , BASE_URL ,
406
+ self .frontend = SAMLMirrorFrontend (lambda ctx , req : None , lambda ctx , req : None ,
407
+ INTERNAL_ATTRIBUTES , conf , BASE_URL ,
403
408
"saml_mirror_frontend" )
404
409
self .frontend .register_endpoints ([self .BACKEND ])
405
410
@@ -490,6 +495,7 @@ def frontend(self, idp_conf, sp_conf):
490
495
# Create, register the endpoints, and then return the frontend
491
496
# instance.
492
497
frontend = SAMLVirtualCoFrontend (lambda ctx , req : None ,
498
+ lambda ctx , logout_req : None ,
493
499
internal_attributes ,
494
500
conf ,
495
501
BASE_URL ,
0 commit comments