Package org.jboss.identity.federation.api.saml.v2.request

Examples of org.jboss.identity.federation.api.saml.v2.request.SAML2Request.marshall()


         HttpServletResponse response)
   throws IOException, SAXException, JAXBException,GeneralSecurityException
   {
      SAML2Request saml2Request = new SAML2Request();
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      saml2Request.marshall(authnRequest, baos);
      String samlMessage = PostBindingUtil.base64Encode(baos.toString())
      String destination = authnRequest.getDestination();
      PostBindingUtil.sendPost(new DestinationInfoHolder(destination, samlMessage, relayState),
             response, true);
View Full Code Here


      if(log.isTraceEnabled())
      {
         StringWriter sw = new StringWriter();
         try
         {
            saml2Request.marshall(authnRequestType, sw);
         }
         catch (SAXException e)
         {
            log.trace(e);
         }
View Full Code Here

     
      SPUtil spUtil = new SPUtil();
      AuthnRequestType authnRequest = spUtil.createSAMLRequest(serviceURL, identityURL);
      
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      saml2Request.marshall(authnRequest, baos);
      String base64Request = RedirectBindingUtil.deflateBase64URLEncode(baos.toByteArray());
      String destination = authnRequest.getDestination() + getDestination(base64Request, relayState);
      if(trace)
         log.trace("Sending to destination="+destination);
View Full Code Here

   protected void sendRequestToIDP(AuthnRequestType authnRequest, String relayState, Response response)
   throws IOException, SAXException, JAXBException, GeneralSecurityException
   {
      SAML2Request saml2Request = new SAML2Request();
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      saml2Request.marshall(authnRequest, baos);
      String samlMessage = PostBindingUtil.base64Encode(baos.toString())
      String destination = authnRequest.getDestination();
     
      PostBindingUtil.sendPost(new DestinationInfoHolder(destination, samlMessage, relayState),
View Full Code Here

   protected void sendRequestToIDP(AuthnRequestType authnRequest, String relayState, Response response)
   throws IOException, SAXException, JAXBException,GeneralSecurityException
   {
      SAML2Request saml2Request = new SAML2Request();
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      saml2Request.marshall(authnRequest, baos);
      String samlMessage = PostBindingUtil.base64Encode(baos.toString())
      String destination = authnRequest.getDestination();
      PostBindingUtil.sendPost(new DestinationInfoHolder(destination, samlMessage, relayState),
             response, true);
View Full Code Here

   {
      try
      {
         SAML2Response saml2Response = new SAML2Response();
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            saml2Response.marshall(responseType, baos);

            String urlEncodedResponse = RedirectBindingUtil.deflateBase64URLEncode(baos.toByteArray());

            String destination = responseType.getDestination();
            log.trace("IDP:Destination=" + destination);
View Full Code Here

      if(log.isTraceEnabled())
      {
         StringWriter sw = new StringWriter();
         try
         {
            saml2Response.marshall(responseType, sw);
         }
         catch (JAXBException e)
         {
            log.trace(e);
         }
View Full Code Here

         log.debug("ResponseType = ");
         //Lets see how the response looks like
         if(log.isTraceEnabled())
         {
            StringWriter sw = new StringWriter();
            saml2Response.marshall(responseType, sw);
            log.trace("IDPRedirectValve::Response="+sw.toString());
         }

         return responseType;      
     
View Full Code Here

   {
      SAML2Response saml2Response = new SAML2Response();
      
      // Deal with the original request
      StringWriter sw = new StringWriter();
      saml2Response.marshall(responseType, sw);
     
      //URL Encode the Request
      String urlEncodedResponse = RedirectBindingUtil.deflateBase64URLEncode(sw.toString());
   
      String urlEncodedRelayState = null;
View Full Code Here

            int keyLength = enc.getKeySize();
            //Generate a key on the fly
            SecretKey sk = keyManager.getEncryptionKey(spurl.getHost(), encAlgo, keyLength);
           
            StringWriter sw = new StringWriter();
            saml2Response.marshall(responseType, sw);
           
            Document responseDoc = DocumentUtil.getDocument(new StringReader(sw.toString()))
     
            String assertionNS = JBossSAMLURIConstants.ASSERTION_NSURI.get();
           
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.