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

Examples of org.jboss.identity.federation.api.saml.v2.metadata.SecurityActions


      if(serviceURL == null)
         throw new IllegalArgumentException("serviceURL is null");
      if(identityURL == null)
         throw new IllegalArgumentException("identityURL is null");
     
      SAML2Request saml2Request = new SAML2Request();
      String id = IDGenerator.create("ID_");
      return saml2Request.createAuthnRequestType(id, serviceURL, identityURL, serviceURL);
   }
View Full Code Here


  
   protected void sendRequestToIDP(AuthnRequestType authnRequest, String relayState,
         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

  
   public RequestAbstractType getSAMLRequest(String samlMessage)
   throws ParsingException, IOException
   {
      InputStream is = null;
      SAML2Request saml2Request = new SAML2Request()
      if(redirectProfile)
      {
         is = RedirectBindingUtil.base64DeflateDecode(samlMessage);
      }
      else
      {
         byte[] samlBytes = PostBindingUtil.base64Decode(samlMessage);
         if(trace) log.trace("SAMLRequest=" + new String(samlBytes));
         is = new ByteArrayInputStream(samlBytes);
      }
      return saml2Request.getRequestType(is);
   }
View Full Code Here

    * @throws GeneralSecurityException
    */
   public static String getSAMLRequestURLWithSignature(AuthnRequestType authRequest, String relayState,
         PrivateKey signingKey) throws SAXException, JAXBException, IOException, GeneralSecurityException
   {
      SAML2Request saml2Request = new SAML2Request();
      
      // Deal with the original request
      StringWriter sw = new StringWriter();
      saml2Request.marshall(authRequest, sw);
     
      //URL Encode the Request
      String urlEncodedRequest = RedirectBindingUtil.deflateBase64URLEncode(sw.toString());
   
      String urlEncodedRelayState = null;
View Full Code Here

   public static AuthnRequestType getRequestFromSignedURL(String signedURL)
   throws JAXBException, SAXException, IOException 
   {
      String samlRequestTokenValue =  getTokenValue(signedURL, "SAMLRequest");
     
      SAML2Request saml2Request = new SAML2Request();
      return saml2Request.getAuthnRequestType(RedirectBindingUtil.urlBase64DeflateDecode(samlRequestTokenValue));
   }
View Full Code Here

         String serviceProviderURL = request.getScheme() + "://" + request.getServerName() + ":"
               + request.getServerPort() + request.getContextPath() + "/SamlAuthenticationFilter.seam";

         AuthnRequestType authnRequest = createSAMLRequest(serviceProviderURL, identityProviderURL);

         SAML2Request saml2Request = new SAML2Request();
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         saml2Request.marshall(authnRequest, baos);

         String samlMessage = PostBindingUtil.base64Encode(baos.toString());
         if (binding == Binding.HTTP_Redirect)
         {
            String deflatedRequest = RedirectBindingUtil.deflateBase64URLEncode(baos.toByteArray());
View Full Code Here

      if(serviceURL == null)
         throw new IllegalArgumentException("serviceURL is null");
      if(identityURL == null)
         throw new IllegalArgumentException("identityURL is null");
     
      SAML2Request saml2Request = new SAML2Request();
      String id = IDGenerator.create("ID_");
      return saml2Request.createAuthnRequestType(id, serviceURL, identityURL, serviceURL);
   }
View Full Code Here

    * @throws MarshalException
    * @throws GeneralSecurityException
    */
   public Document sign(RequestAbstractType request, KeyPair keypair) throws SAXException, IOException, JAXBException, ParserConfigurationException, GeneralSecurityException, MarshalException, XMLSignatureException 
   {
      SAML2Request saml2Request = new SAML2Request();
      Document doc = saml2Request.convert(request);
      doc.normalize();
     
      String referenceURI = "#" + request.getID();
      
      return XMLSignatureUtil.sign(doc,
View Full Code Here

  
   public RequestAbstractType getSAMLRequest(String samlMessage)
   throws ParsingException, IOException
   {
      InputStream is = null;
      SAML2Request saml2Request = new SAML2Request()
      if(redirectProfile)
      {
         is = RedirectBindingUtil.base64DeflateDecode(samlMessage);
      }
      else
      {
         byte[] samlBytes = PostBindingUtil.base64Decode(samlMessage);
         if(trace) log.trace("SAMLRequest=" + new String(samlBytes));
         is = new ByteArrayInputStream(samlBytes);
      }
      return saml2Request.getRequestType(is);
   }
View Full Code Here

      if(serviceURL == null)
         throw new IllegalArgumentException("serviceURL is null");
      if(identityURL == null)
         throw new IllegalArgumentException("identityURL is null");
     
      SAML2Request saml2Request = new SAML2Request();
      String id = IDGenerator.create("ID_");
      return saml2Request.createAuthnRequestType(id, serviceURL, identityURL, serviceURL);
   }
View Full Code Here

TOP

Related Classes of org.jboss.identity.federation.api.saml.v2.metadata.SecurityActions

Copyright © 2018 www.massapicom. 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.