public static boolean verifySignature(Response samlResponse){
  if ((samlResponse != null) && (!samlResponse.isSigned() || (!samlResponse.isSignatureValid()))) {
    return false;
  }
  return true;
}

public static boolean verifySignature ( Response samlResponse ) { if ( ( samlResponse != null ) && ( ! samlResponse . isSigned ( ) || ( ! samlResponse . isSignatureValid ( ) ) ) ) { return false ; } return true ; }
verifies signature for post response .
