Examples of IdentityParticipantStack


Examples of org.picketlink.identity.federation.web.core.IdentityParticipantStack

        MockCatalinaRequest request = AuthenticatorTestUtils.createRequest(SERVICE_PROVIDER_HOST_ADDRESS, true);
        MockCatalinaResponse response = new MockCatalinaResponse();

        sendAuthenticationRequest(request, response, SERVICE_PROVIDER_URL, true);

        IdentityParticipantStack testIdentityParticipantStack = TestIdentityParticipantStack.getDelegate();

        assertEquals("Unexpected total created sessions.", 1, testIdentityParticipantStack.totalSessions());

        ResponseType responseType = getResponseTypeAndCheckSignature(response, null);

        assertNotNull(responseType);
        assertEquals(1, responseType.getAssertions().size());
        assertEquals(responseType.getAssertions().get(0).getAssertion().getIssuer().getValue(), IDENTITY_PROVIDER_URL);

        // The response should redirect back to the caller SP
        assertTrue("Expected a redirect to the SP.", response.redirectString.contains(SERVICE_PROVIDER_URL));

        String currentSessionID = request.getSession().getId();

        // asserts if there is a participant for the current session ID
        assertEquals(1, testIdentityParticipantStack.getParticipants(currentSessionID));

        // asserts if the last participant in the stack is the last caller SP
        assertEquals(SERVICE_PROVIDER_URL, testIdentityParticipantStack.peek(currentSessionID));
    }
View Full Code Here

Examples of org.picketlink.identity.federation.web.core.IdentityParticipantStack

        //IDP should now send the final logout response to Sales application who sent the original request
        sp.authenticate(request, response, new LoginConfig());

        //Ensure that at the IDP we do not have any participants in the session (both employee and sales are logged out)
        IdentityParticipantStack stack = server.stack();
        assertEquals(0, stack.getParticipants(session.getId()));
        assertEquals(0, stack.getNumOfParticipantsInTransit(session.getId()));

        // Finally the session should be invalidated
        assertTrue(session.isInvalidated());
    }
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.