public static String parseSignedMessage(HttpServletRequest request) throws IllegalArgumentException {
  String queryString=request.getQueryString();
  String samlRequest=HTTPTransportUtils.getRawQueryStringParameter(queryString,SamlUtils.SAML_REQUEST_PARAMETER);
  String samlResponse=HTTPTransportUtils.getRawQueryStringParameter(queryString,SamlUtils.SAML_RESPONSE_PARAMETER);
  Validate.isTrue(samlRequest != null || samlResponse != null);
  String signature=HTTPTransportUtils.getRawQueryStringParameter(queryString,SamlUtils.SIGNATURE_PARAMETER);
  String sigAlgo=HTTPTransportUtils.getRawQueryStringParameter(queryString,SamlUtils.SIGNATURE_ALGORITHM_PARAMETER);
  String relayState=HTTPTransportUtils.getRawQueryStringParameter(queryString,SamlUtils.RELAY_STATE_PARAMETER);
  if (signature == null || sigAlgo == null) {
    return null;
  }
  StringBuilder builder=new StringBuilder();
  if (samlRequest != null) {
    builder.append(samlRequest);
  }
 else {
    builder.append(samlResponse);
  }
  if (relayState != null) {
    builder.append('&');
    builder.append(relayState);
  }
  builder.append('&');
  builder.append(sigAlgo);
  String signedMessage=builder.toString();
  log.debug("Constructed signed message {}",signedMessage);
  return signedMessage;
}

public static String parseSignedMessage ( HttpServletRequest request ) throws IllegalArgumentException { String queryString = request . getQueryString ( ) ; String samlRequest = HTTPTransportUtils . getRawQueryStringParameter ( queryString , SamlUtils . SAML_REQUEST_PARAMETER ) ; String samlResponse = HTTPTransportUtils . getRawQueryStringParameter ( queryString , SamlUtils . SAML_RESPONSE_PARAMETER ) ; Validate . isTrue ( samlRequest != null || samlResponse != null ) ; String signature = HTTPTransportUtils . getRawQueryStringParameter ( queryString , SamlUtils . SIGNATURE_PARAMETER ) ; String sigAlgo = HTTPTransportUtils . getRawQueryStringParameter ( queryString , SamlUtils . SIGNATURE_ALGORITHM_PARAMETER ) ; String relayState = HTTPTransportUtils . getRawQueryStringParameter ( queryString , SamlUtils . RELAY_STATE_PARAMETER ) ; if ( signature == null || sigAlgo == null ) { return null ; } StringBuilder builder = new StringBuilder ( ) ; if ( samlRequest != null ) { builder . append ( samlRequest ) ; } else { builder . append ( samlResponse ) ; } if ( relayState != null ) { builder . append ( '&' ) ; builder . append ( relayState ) ; } builder . append ( '&' ) ; builder . append ( sigAlgo ) ; String signedMessage = builder . toString ( ) ; log . debug ( "Constructed signed message {}" , signedMessage ) ; return signedMessage ; }
return signed message in a http saml request or response
