Package org.picketlink.identity.federation.bindings.tomcat.idp

Examples of org.picketlink.identity.federation.bindings.tomcat.idp.IDPWebBrowserSSOValve.invoke()


        MockCatalinaResponse response = new MockCatalinaResponse();

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        response.setWriter(new PrintWriter(baos));

        idp.invoke(request, response);

        return response;
    }

    private MockCatalinaResponse sendSPRequest(MockCatalinaRequest request, boolean validateAuthentication, String idpAddress)
View Full Code Here


        MockCatalinaResponse response = new MockCatalinaResponse();

        response.setWriter(new PrintWriter(new ByteArrayOutputStream()));

        idp.invoke(request, response);

        ((MockCatalinaSession) request.getSession()).clear();

        return response;
    }
View Full Code Here

        request.setParameter("SAMLRequest", samlMessage);
        request.setUserPrincipal(new GenericPrincipal(realm, "anil", "test", roles));
        request.setMethod("POST");

        // Lets start the workflow with post
        idp.invoke(request, response);

        String idpResponseString = new String(baos.toByteArray());
        Document idpHTMLResponse = DocumentUtil.getDocument(idpResponseString);
        nodes = idpHTMLResponse.getElementsByTagName("INPUT");
        inputElement = (Element) nodes.item(0);
View Full Code Here

        idp.setIgnoreIncomingSignatures(true);
        idp.setStrictPostBinding(false);

        idp.setContainer(context);
        idp.start();
        idp.invoke(request, response);

        redirectStr = response.redirectString;
        assertNotNull(redirectStr);
        String samlResponse = RedirectBindingUtil.urlDecode(redirectStr.substring(redirectStr.indexOf(SAML_RESPONSE_KEY)
                + SAML_RESPONSE_KEY.length()));
View Full Code Here

        // The IDP is preloaded with 2 participants : "http://localhost:8080/sales/"
        // and "http://localhost:8080/employee"

        // Lets start the workflow with get
        request.setMethod("GET");
        idp.invoke(request, response);

        String redirectStr = response.redirectString;

        String destination = redirectStr.substring(0, redirectStr.indexOf(SAML_REQUEST_KEY) - 1);
        String relayState = redirectStr.substring(redirectStr.indexOf(RELAY_STATE_KEY) + RELAY_STATE_KEY.length());
View Full Code Here

        request.setParameter("RelayState", relayState);

        baos = new ByteArrayOutputStream();
        response.setOutputStream(baos);
        response.setWriter(new PrintWriter(baos));
        idp.invoke(request, response);

        destination = redirectStr.substring(0, redirectStr.indexOf(SAML_RESPONSE_KEY) - 1);
        relayState = redirectStr.substring(redirectStr.indexOf(RELAY_STATE_KEY) + RELAY_STATE_KEY.length());
        logoutResponse = redirectStr.substring(redirectStr.indexOf(SAML_RESPONSE_KEY) + SAML_RESPONSE_KEY.length(),
                redirectStr.indexOf(RELAY_STATE_KEY) - 1);
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.