File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -181,17 +181,20 @@ public function federationDiscovery(Request $request): Response
181181 $ trustAnchorId = null ;
182182 $ isFormSubmitted = false ;
183183 $ entities = [];
184+ $ forceRefresh = false ;
184185
185186 if ($ request ->isMethod (Request::METHOD_POST )) {
186187 $ isFormSubmitted = true ;
187188
188189 !empty ($ trustAnchorId = $ request ->request ->getString ('trustAnchorId ' )) ||
189190 throw new OidcException ('Empty Trust Anchor ID. ' );
190191
192+ $ forceRefresh = $ request ->request ->getBoolean ('forceRefresh ' );
193+
191194 try {
192195 $ entities = $ this ->federationWithArrayLogger ->federationDiscovery ()->discoverEntityIds (
193196 trustAnchorId: $ trustAnchorId ,
194- // forceRefresh: true, // TODO make optional in form
197+ forceRefresh: $ forceRefresh ,
195198 );
196199 } catch (\Throwable $ exception ) {
197200 $ this ->arrayLogger ->error (sprintf (
@@ -219,6 +222,7 @@ public function federationDiscovery(Request $request): Response
219222 'isFormSubmitted ' ,
220223 'entities ' ,
221224 'trustAnchorIds ' ,
225+ 'forceRefresh ' ,
222226 ),
223227 RoutesEnum::AdminTestFederationDiscovery->value ,
224228 );
Original file line number Diff line number Diff line change 3636 >
3737 <span class =" pure-form-message" >Use any Trust Anchor ID for discovery</span >
3838
39+ <label for =" forceRefresh" >{{ ' Force refresh?' | trans }}</label >
40+ <input type =" checkbox"
41+ name =" forceRefresh"
42+ id =" forceRefresh" value =" 1"
43+ {{ forceRefresh ? ' checked' : ' ' }}
44+ >
45+ <span class =" pure-form-message" >
46+ {% trans %}Check if you want to force the refresh of entities in federation.{% endtrans %}
47+ </span >
48+
3949 <br >
4050 <button type =" submit" class =" pure-button " >{{ (actionText | default (' Submit' ))| trans }}</button >
4151 </fieldset >
You can’t perform that action at this time.
0 commit comments