File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ class SAMLBackend(BackendModule, SAMLBaseModule):
41
41
"""
42
42
KEY_DISCO_SRV = 'disco_srv'
43
43
KEY_SAML_DISCOVERY_SERVICE_URL = 'saml_discovery_service_url'
44
+ KEY_SAML_DISCOVERY_SERVICE_POLICY = 'saml_discovery_service_policy'
44
45
KEY_SP_CONFIG = 'sp_config'
45
46
VALUE_ACR_COMPARISON_DEFAULT = 'exact'
46
47
@@ -121,12 +122,19 @@ def disco_query(self, context):
121
122
return_url = endpoints ["discovery_response" ][0 ][0 ]
122
123
123
124
disco_url = context .get_decoration (self .KEY_SAML_DISCOVERY_SERVICE_URL )
125
+ disco_policy = (
126
+ context .get_decoration (self .KEY_SAML_DISCOVERY_SERVICE_POLICY )
127
+ )
128
+
124
129
if not disco_url :
125
130
disco_url = self .discosrv
126
131
132
+ args = {"return" : return_url }
133
+ if disco_policy :
134
+ args ["policy" ] = disco_policy
135
+
127
136
loc = self .sp .create_discovery_service_request (
128
- disco_url ,
129
- self .sp .config .entityid , ** {"return" : return_url })
137
+ disco_url , self .sp .config .entityid , ** args )
130
138
131
139
return SeeOther (loc )
132
140
You can’t perform that action at this time.
0 commit comments