protected void sendRequestToIDP(AuthnRequestType authnRequest, String relayState, HttpServletResponse response) throws IOException, SAXException, GeneralSecurityException { SAML2Request saml2Request = new SAML2Request(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); saml2Request.marshall(authnRequest, baos); String samlMessage = PostBindingUtil.base64Encode(baos.toString()); String destination = authnRequest.getDestination().toASCIIString(); PostBindingUtil.sendPost(new DestinationInfoHolder(destination, samlMessage, relayState), response, true); }
String relayState = holder.getRelayState(); String destination = holder.getDestination(); String samlMessage = holder.getSamlMessage(); common(holder.getDestination(), response); StringBuilder builder = new StringBuilder();
String relayState = holder.getRelayState(); String destination = holder.getDestination(); String samlMessage = holder.getSamlMessage(); common(holder.getDestination(), response); StringBuilder builder = new StringBuilder();
protected void sendRequestToIDP(AuthnRequestType authnRequest, String relayState, HttpServletResponse response) throws IOException, SAXException, GeneralSecurityException { SAML2Request saml2Request = new SAML2Request(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); saml2Request.marshall(authnRequest, baos); String samlMessage = PostBindingUtil.base64Encode(baos.toString()); String destination = authnRequest.getDestination().toASCIIString(); PostBindingUtil.sendPost(new DestinationInfoHolder(destination, samlMessage, relayState), response, true); }
String key = willSendRequest ? GeneralConstants.SAML_REQUEST_KEY : GeneralConstants.SAML_RESPONSE_KEY; String relayState = holder.getRelayState(); String destination = holder.getDestination(); String samlMessage = holder.getSamlMessage();
protected void sendRequestToIDP(AuthnRequestType authnRequest, String relayState, HttpServletResponse response) throws IOException, SAXException, GeneralSecurityException { SAML2Request saml2Request = new SAML2Request(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); saml2Request.marshall(authnRequest, baos); String samlMessage = SamlPostBindingUtil.base64Encode(baos.toString()); String destination = authnRequest.getDestination().toASCIIString(); SamlPostBindingUtil.sendPost(new DestinationInfoHolder(destination, samlMessage, relayState), response, true); }
String key = willSendRequest ? GeneralConstants.SAML_REQUEST_KEY : GeneralConstants.SAML_RESPONSE_KEY; String relayState = holder.getRelayState(); String destination = holder.getDestination(); String samlMessage = holder.getSamlMessage();
protected void sendRequestToIDP(AuthnRequestType authnRequest, String relayState, HttpServletResponse response) throws IOException, SAXException, GeneralSecurityException { SAML2Request saml2Request = new SAML2Request(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); saml2Request.marshall(authnRequest, baos); String samlMessage = PostBindingUtil.base64Encode(baos.toString()); String destination = authnRequest.getDestination().toASCIIString(); PostBindingUtil.sendPost(new DestinationInfoHolder(destination, samlMessage, relayState), response, true); }
String key = request ? GeneralConstants.SAML_REQUEST_KEY : GeneralConstants.SAML_RESPONSE_KEY; String relayState = holder.getRelayState(); String destination = holder.getDestination(); String samlMessage = holder.getSamlMessage(); common(holder.getDestination(), response); StringBuilder builder = new StringBuilder();
protected void sendHttpPostBindingRequest(String destination, Document samlDocument, String relayState, HttpServletResponse response, boolean willSendRequest) throws ProcessingException, IOException, ConfigurationException { String samlMessage = PostBindingUtil.base64Encode(DocumentUtil.getDocumentAsString(samlDocument)); DestinationInfoHolder destinationHolder = new DestinationInfoHolder(destination, samlMessage, relayState); PostBindingUtil.sendPost(destinationHolder, response, willSendRequest); }
String key = request ? GeneralConstants.SAML_REQUEST_KEY : GeneralConstants.SAML_RESPONSE_KEY; String relayState = holder.getRelayState(); String destination = holder.getDestination(); String samlMessage = holder.getSamlMessage(); common(holder.getDestination(), response); StringBuilder builder = new StringBuilder();
protected void sendHttpPostBindingRequest(String destination, Document samlDocument, String relayState, HttpServletResponse response, boolean willSendRequest) throws ProcessingException, IOException, ConfigurationException { String samlMessage = PostBindingUtil.base64Encode(DocumentUtil.getDocumentAsString(samlDocument)); DestinationInfoHolder destinationHolder = new DestinationInfoHolder(destination, samlMessage, relayState); PostBindingUtil.sendPost(destinationHolder, response, willSendRequest); }
String key = request ? GeneralConstants.SAML_REQUEST_KEY : GeneralConstants.SAML_RESPONSE_KEY; String relayState = holder.getRelayState(); String destination = holder.getDestination(); String samlMessage = holder.getSamlMessage(); common(holder.getDestination(), response); StringBuilder builder = new StringBuilder();
protected void sendToDestination(Document samlDocument, String relayState, String destination, HttpServletResponse response, boolean request) throws IOException, SAXException, GeneralSecurityException { // if (!ignoreSignatures) { // SAML2Signature samlSignature = new SAML2Signature(); // // Node nextSibling = samlSignature.getNextSiblingOfIssuer(samlDocument); // if (nextSibling != null) { // samlSignature.setNextSibling(nextSibling); // } // KeyPair keypair = keyManager.getSigningKeyPair(); // samlSignature.signSAMLDocument(samlDocument, keypair); // } String samlMessage = SamlPostBindingUtil.base64Encode(DocumentUtil.getDocumentAsString(samlDocument)); SamlPostBindingUtil.sendPost(new DestinationInfoHolder(destination, samlMessage, relayState), response, request); }
String key = request ? GeneralConstants.SAML_REQUEST_KEY : GeneralConstants.SAML_RESPONSE_KEY; String relayState = holder.getRelayState(); String destination = holder.getDestination(); String samlMessage = holder.getSamlMessage(); common(holder.getDestination(), response); StringBuilder builder = new StringBuilder();
/** * <p> Sends a HTTP POST request to the IDP. </p> * * @param destination * @param samlDocument * @param relayState * @param response * @param willSendRequest * * @throws ProcessingException * @throws IOException * @throws ConfigurationException */ protected void sendHttpPostBindingRequest(String destination, Document samlDocument, String relayState, Response response, boolean willSendRequest) throws ProcessingException, IOException, ConfigurationException { String samlMessage = PostBindingUtil.base64Encode(DocumentUtil.getDocumentAsString(samlDocument)); DestinationInfoHolder destinationHolder = new DestinationInfoHolder(destination, samlMessage, relayState); PostBindingUtil.sendPost(destinationHolder, response, willSendRequest); }
/** * Send the request to the IDP * * @param destination idp url * @param samlDocument request or response document * @param relayState * @param response * @param willSendRequest are we sending Request or Response to IDP * @throws ProcessingException * @throws ConfigurationException * @throws IOException */ protected void sendRequestToIDP(String destination, Document samlDocument, String relayState, HttpServletResponse response, boolean willSendRequest) throws ProcessingException, ConfigurationException, IOException { String samlMessage = DocumentUtil.getDocumentAsString(samlDocument); samlMessage = PostBindingUtil.base64Encode(samlMessage); PostBindingUtil.sendPost(new DestinationInfoHolder(destination, samlMessage, relayState), response, willSendRequest); } }
/** * Send the request to the IDP * * @param destination idp url * @param samlDocument request or response document * @param relayState * @param response * @param willSendRequest are we sending Request or Response to IDP * * @throws ProcessingException * @throws ConfigurationException * @throws IOException */ protected void sendRequestToIDP(String destination, Document samlDocument, String relayState, HttpServletResponse response, boolean willSendRequest) throws ProcessingException, ConfigurationException, IOException { String samlMessage = DocumentUtil.getDocumentAsString(samlDocument); samlMessage = PostBindingUtil.base64Encode(samlMessage); PostBindingUtil.sendPost(new DestinationInfoHolder(destination, samlMessage, relayState), response, willSendRequest); } }
/** * <p> Sends a HTTP POST request to the IDP. </p> * * @param destination * @param samlDocument * @param relayState * @param response * @param willSendRequest * * @throws ProcessingException * @throws IOException * @throws ConfigurationException */ protected void sendHttpPostBindingRequest(String destination, Document samlDocument, String relayState, Response response, boolean willSendRequest) throws ProcessingException, IOException, ConfigurationException { String samlMessage = PostBindingUtil.base64Encode(DocumentUtil.getDocumentAsString(samlDocument)); DestinationInfoHolder destinationHolder = new DestinationInfoHolder(destination, samlMessage, relayState); PostBindingUtil.sendPost(destinationHolder, response, willSendRequest); }
/** * <p> Sends a HTTP POST request to the IDP. </p> * * @param destination * @param samlDocument * @param relayState * @param response * @param willSendRequest * * @throws ProcessingException * @throws IOException * @throws ConfigurationException */ protected void sendHttpPostBindingRequest(String destination, Document samlDocument, String relayState, Response response, boolean willSendRequest) throws ProcessingException, IOException, ConfigurationException { String samlMessage = PostBindingUtil.base64Encode(DocumentUtil.getDocumentAsString(samlDocument)); DestinationInfoHolder destinationHolder = new DestinationInfoHolder(destination, samlMessage, relayState); PostBindingUtil.sendPost(destinationHolder, response, willSendRequest); }