public static void sendSLORequestsToOtherParticipants(String tenant,LogoutState logoutState) throws IOException {
  log.info("Sending SAML logout response to other participants.");
  Locale locale=logoutState.getLocale();
  HttpServletResponse response=logoutState.getResponse();
  Validate.notNull(response);
  Collection<String> samlRequestUrls=logoutState.generateRequestUrlsForTenant(tenant,logoutState.getMessageSource(),locale);
  if (samlRequestUrls == null)   return;
  for (  String requestUrl : samlRequestUrls) {
    log.info("SAML Redirect URL is " + requestUrl);
    if (requestUrl != null) {
      Throwable exception=null;
      try {
        sendSLORequestToOtherParticipant(requestUrl);
      }
 catch (      URISyntaxException e) {
        exception=e;
      }
catch (      IOException e) {
        exception=e;
      }
catch (      KeyManagementException e) {
        exception=e;
      }
catch (      NoSuchAlgorithmException e) {
        exception=e;
      }
catch (      KeyStoreException e) {
        exception=e;
      }
      if (exception != null) {
        log.error("exception in sending out single log out request to participent. Request string: " + requestUrl,exception);
      }
    }
 else {
      SamlServiceImpl.sendLogoutError(locale,response,logoutState,logoutState.getMessageSource());
    }
  }
}

public static void sendSLORequestsToOtherParticipants ( String tenant , LogoutState logoutState ) throws IOException { log . info ( "Sending SAML logout response to other participants." ) ; Locale locale = logoutState . getLocale ( ) ; HttpServletResponse response = logoutState . getResponse ( ) ; Validate . notNull ( response ) ; Collection < String > samlRequestUrls = logoutState . generateRequestUrlsForTenant ( tenant , logoutState . getMessageSource ( ) , locale ) ; if ( samlRequestUrls == null ) return ; for ( String requestUrl : samlRequestUrls ) { log . info ( "SAML Redirect URL is " + requestUrl ) ; if ( requestUrl != null ) { Throwable exception = null ; try { sendSLORequestToOtherParticipant ( requestUrl ) ; } catch ( URISyntaxException e ) { exception = e ; } catch ( IOException e ) { exception = e ; } catch ( KeyManagementException e ) { exception = e ; } catch ( NoSuchAlgorithmException e ) { exception = e ; } catch ( KeyStoreException e ) { exception = e ; } if ( exception != null ) { log . error ( "exception in sending out single log out request to participent. Request string: " + requestUrl , exception ) ; } } else { SamlServiceImpl . sendLogoutError ( locale , response , logoutState , logoutState . getMessageSource ( ) ) ; } } }
helper method to generate logoutrequests and send to non - initiating participants
