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

Examples of org.picketlink.identity.federation.bindings.tomcat.sp.ServiceProviderAuthenticator


     * to the error page.
     * </p>
     */
    @Test
    public void testWrapIntoSignedSAMLResponse() throws Exception {
        ServiceProviderAuthenticator spAuthenticator = createSPAuthenticator(true);

        // first interaction with the SP. We should receive from the SP a AuthnRequest type
        String authnRequest = invokeSPAndGetAuthnRequest(spAuthenticator);

        IDPWebBrowserSSOValve idpAuthenticator = createIDPAuthenticator(true);
View Full Code Here


    }

    @Test
    public void testWrapWithSignedAssertion() throws Exception {
       // same workflow like previous test for obtaining valid idpResponse from IDP
       ServiceProviderAuthenticator spAuthenticator = createSPAuthenticator(true);
       String authnRequest = invokeSPAndGetAuthnRequest(spAuthenticator);
       IDPWebBrowserSSOValve idpAuthenticator = createIDPAuthenticator(true);
       String idpResponse = invokeIDPAndGetSAMLResponse(idpAuthenticator, authnRequest);
       byte[] samlIDPResponse = PostBindingUtil.base64Decode(idpResponse);
       Document samlResponseDoc = DocumentUtil.getDocument(new ByteArrayInputStream(samlIDPResponse));
View Full Code Here

     * </p>
     */
    @Test
    @Ignore
    public void testReplaceOriginalAssertion() throws Exception {
        ServiceProviderAuthenticator spAuthenticator = createSPAuthenticator(false);

        // first interaction with the SP. We should receive from the SP a AuthnRequest type
        String authnRequest = invokeSPAndGetAuthnRequest(spAuthenticator);

        IDPWebBrowserSSOValve idpAuthenticator = createIDPAuthenticator(false);
View Full Code Here

     * processing.
     * </p>
     */
    @Test
    public void testWrapBadAssertionBeforeOriginal() throws Exception {
        ServiceProviderAuthenticator spAuthenticator = createSPAuthenticator(false);

        // first interaction with the SP. We should receive from the SP a AuthnRequest type
        String authnRequest = invokeSPAndGetAuthnRequest(spAuthenticator);

        IDPWebBrowserSSOValve idpAuthenticator = createIDPAuthenticator(false);
View Full Code Here

     *
     * @param supportsSignatures indicates if the authenticator supports signatures or not.
     * @return
     */
    private ServiceProviderAuthenticator createSPAuthenticator(boolean supportsSignatures) throws Exception {
        ServiceProviderAuthenticator spAuthenticator = new ServiceProviderAuthenticator();

        SPType spType = new SPType();

        spType.setBindingType("POST");
        spType.setIdentityURL("http://localhost/idp");
        spType.setSupportsSignature(supportsSignatures);

        spType.setServiceURL("http://localhost/sp");

        spAuthenticator.setConfigProvider(new MockSAMLConfigurationProvider(spType));

        spAuthenticator.setContainer(this.spContext);

        spAuthenticator.testStart();

        return spAuthenticator;
    }
View Full Code Here

TOP

Related Classes of org.picketlink.identity.federation.bindings.tomcat.sp.ServiceProviderAuthenticator

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.