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

Examples of org.picketlink.identity.federation.api.saml.v2.request.SAML2Request.convert()


    * @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


         SAML2Request samlRequest = new SAML2Request();
         try
         {
            LogoutRequestType lot =
               samlRequest.createLogoutRequest(request.getIssuer().getValue());
            response.setResultingDocument(samlRequest.convert(lot));
         }
         catch (Exception e)
         {
            throw new ProcessingException(e);
         }
View Full Code Here

         try
         {
            AuthnRequestType authn = samlRequest.createAuthnRequestType(id,
                issuerValue, response.getDestination(), issuerValue);
           
            response.setResultingDocument(samlRequest.convert(authn));
         }
         catch (Exception e)
         {
            throw new ProcessingException(e);
        
View Full Code Here

           
            SAML2Request saml2Request = new SAML2Request();
            try
            {
               LogoutRequestType lort = saml2Request.createLogoutRequest(request.getIssuer().getValue());
               response.setResultingDocument(saml2Request.convert(lort));
            }
            catch(Exception e)
            {
               throw new ProcessingException(e);
            }
View Full Code Here

              
               response.setDestination(participant);
              
              
               LogoutRequestType lort = saml2Request.createLogoutRequest(request.getIssuer().getValue());
               response.setResultingDocument(saml2Request.convert(lort));
            }
         }
         catch(ParserConfigurationException pe)
         {
            throw new ProcessingException(pe);
View Full Code Here

    * @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

        IDPWebBrowserSSOValve idp = new IDPWebBrowserSSOValve();
        idp.setContainer(context);
        idp.setSignOutgoingMessages(false);
        idp.start();

        String samlAuth = DocumentUtil.getDocumentAsString(saml2Request.convert(art));

        String samlMessage = Base64.encodeBytes(samlAuth.getBytes());

        MockCatalinaRealm realm = new MockCatalinaRealm("anil", "test", new Principal() {
            public String getName() {
View Full Code Here

            SAML2Request samlRequest = new SAML2Request();

            AuthnRequestType authnRequestType = samlRequest.createAuthnRequestType(IDGenerator.create("ID_"),
                  assertionConsumerURL, getAuthenticator().getConfiguration().getIdpOrSP().getIdentityURL(), issuer);

            Document authnRequestDocument = samlRequest.convert(authnRequestType);

            logger.info("AuthRequestType:" + prettyPrintDocument(authnRequestDocument).toString());

            if (signToken) {
                request.setQueryString(RedirectBindingSignatureUtil.getSAMLRequestURLWithSignature(authnRequestType, null,
View Full Code Here

        response.setOutputStream(baos);

        IDPLoginServlet login = new IDPLoginServlet();
        login.init(servletConfig);

        String samlAuth = DocumentUtil.getDocumentAsString(saml2Request.convert(art));

        String samlMessage = Base64.encodeBytes(samlAuth.getBytes());
        session.setAttribute("SAMLRequest", samlMessage);

        login.testPost(request, response);
View Full Code Here

        String assertionConsumerURL = "http://sp";
        String destination = "http://idp";
        String issuerValue = "http://sp";
        AuthnRequestType authnRequest = saml2Request.createAuthnRequestType(id, assertionConsumerURL, destination, issuerValue);

        Document authDoc = saml2Request.convert(authnRequest);

        KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA");
        KeyPair keypair = kpg.genKeyPair();

        SAML2SignatureGenerationHandler handler = new SAML2SignatureGenerationHandler();
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.