Examples of SubjectConfirmationType


Examples of org.picketlink.identity.federation.saml.v2.assertion.SubjectConfirmationType

        // validate the security token response.
        AssertionType assertion = this.validateSAMLAssertionResponse(baseResponse, "testcontext", "jduke",
                SAMLUtil.SAML2_HOLDER_OF_KEY_URI);
        // validate the holder of key contents.
        SubjectConfirmationType subjConfirmation = assertion.getSubject().getConfirmation().get(0);
        this.validateHolderOfKeyContents(subjConfirmation, WSTrustConstants.KEY_TYPE_SYMMETRIC, null, false);

        // check if the response contains the STS-generated key.
        RequestSecurityTokenResponseCollection collection = (RequestSecurityTokenResponseCollection) baseResponse;
        RequestSecurityTokenResponse response = collection.getRequestSecurityTokenResponses().get(0);
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.assertion.SubjectConfirmationType

        // validate the security token response.
        AssertionType assertion = this.validateSAMLAssertionResponse(baseResponse, "testcontext", "jduke",
                SAMLUtil.SAML2_HOLDER_OF_KEY_URI);
        // validate the holder of key contents.
        SubjectConfirmationType subjConfirmation = assertion.getSubject().getConfirmation().get(0);
        this.validateHolderOfKeyContents(subjConfirmation, WSTrustConstants.KEY_TYPE_SYMMETRIC, null, false);

        RequestSecurityTokenResponseCollection collection = (RequestSecurityTokenResponseCollection) baseResponse;
        RequestSecurityTokenResponse response = collection.getRequestSecurityTokenResponses().get(0);
        RequestedProofTokenType proofToken = response.getRequestedProofToken();
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.assertion.SubjectConfirmationType

                .parse(DocumentUtil.getSourceAsStream(responseMessage));
        // validate the security token response.
        AssertionType assertion = this.validateSAMLAssertionResponse(baseResponse, "testcontext", "jduke",
                SAMLUtil.SAML2_HOLDER_OF_KEY_URI);
        // validate the holder of key contents.
        SubjectConfirmationType subjConfirmation = assertion.getSubject().getConfirmation().get(0);
        this.validateHolderOfKeyContents(subjConfirmation, WSTrustConstants.KEY_TYPE_PUBLIC, certificate, false);
    }
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.assertion.SubjectConfirmationType

        // validate the security token response.
        AssertionType assertion = this.validateSAMLAssertionResponse(baseResponse, "testcontext", "jduke",
                SAMLUtil.SAML2_HOLDER_OF_KEY_URI);
        // validate the holder of key contents.
        SubjectConfirmationType subjConfirmation = assertion.getSubject().getConfirmation().get(0);
        this.validateHolderOfKeyContents(subjConfirmation, WSTrustConstants.KEY_TYPE_PUBLIC, certificate, true);
    }
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.assertion.SubjectConfirmationType

        NameIDType nameID = (NameIDType) subject.getSubType().getBaseID();
        assertEquals("Unexpected name id qualifier", "urn:picketlink:identity-federation", nameID.getNameQualifier());
        assertEquals("Unexpected name id value", principal, nameID.getValue());

        SubjectConfirmationType subjType = subject.getConfirmation().get(0);
        assertEquals("Unexpected confirmation method", confirmationMethod, subjType.getMethod());

        // validate the assertion conditions.
        assertNotNull("Unexpected null conditions", assertion.getConditions());
        assertEquals(lifetime.getCreated(), assertion.getConditions().getNotBefore());
        assertEquals(lifetime.getExpires(), assertion.getConditions().getNotOnOrAfter());
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.assertion.SubjectConfirmationType

        STSubType subType = subject.getSubType();
        NameIDType subjectNameID = (NameIDType) subType.getBaseID();
        assertEquals("jduke", subjectNameID.getValue());
        assertEquals("urn:picketlink:identity-federation", subjectNameID.getNameQualifier());

        SubjectConfirmationType subjectConfirmation = subject.getConfirmation().get(0);
        assertEquals("urn:oasis:names:tc:SAML:2.0:cm:bearer", subjectConfirmation.getMethod());

        ConditionsType conditions = assertion.getConditions();
        assertEquals(XMLTimeUtil.parse("2010-09-30T19:13:37.911Z"), conditions.getNotBefore());
        assertEquals(XMLTimeUtil.parse("2010-09-30T21:13:37.911Z"), conditions.getNotOnOrAfter());
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.assertion.SubjectConfirmationType

        STSubType subType = subject.getSubType();
        NameIDType subjectNameID = (NameIDType) subType.getBaseID();
        assertEquals("3f7b3dcf-1674-4ecd-92c8-1544f346baf8", subjectNameID.getValue());
        assertEquals("urn:oasis:names:tc:SAML:2.0:nameid-format:transient", subjectNameID.getFormat().toString());

        SubjectConfirmationType subjectConfirmation = subject.getConfirmation().get(0);
        assertEquals("urn:oasis:names:tc:SAML:2.0:cm:bearer", subjectConfirmation.getMethod());

        SubjectConfirmationDataType subjectConfirmationData = subjectConfirmation.getSubjectConfirmationData();
        assertEquals("ID_aaf23196-1773-2113-474a-fe114412ab72", subjectConfirmationData.getInResponseTo());
        assertEquals(XMLTimeUtil.parse("2004-12-05T09:27:05Z"), subjectConfirmationData.getNotOnOrAfter());
        assertEquals("https://sp.example.com/SAML2/SSO/POST", subjectConfirmationData.getRecipient());

        ConditionsType conditions = assertion.getConditions();
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.assertion.SubjectConfirmationType

        assertEquals("A_DUDE", ((NameIDType) stType.getBaseID()).getValue());

        List<SubjectConfirmationType> subjectConfirmationTypes = subjectType.getConfirmation();
        assertNotNull(subjectConfirmationTypes);
        assertEquals(1, subjectConfirmationTypes.size());
        SubjectConfirmationType sct = subjectConfirmationTypes.get(0);
        assertEquals("urn:oasis:names:tc:SAML:2.0:cm:sender-vouches", sct.getMethod());
        NameIDType nameID = sct.getNameID();
        assertNotNull(nameID);
        assertEquals("CN=theDUDE", nameID.getValue());

    }
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.assertion.SubjectConfirmationType

        NameIDType subjectNameID = (NameIDType) subject.getSubType().getBaseID();
        assertEquals("anil", subjectNameID.getValue());
        assertEquals("urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", subjectNameID.getFormat().toString());

        SubjectConfirmationType subjectConfirmation = subject.getConfirmation().get(0);

        assertEquals("urn:oasis:names:tc:SAML:2.0:cm:bearer", subjectConfirmation.getMethod());

        SubjectConfirmationDataType subjectConfirmationData = subjectConfirmation.getSubjectConfirmationData();
        assertEquals("ID_04ded476-d73c-48af-b3a9-232a52905ffb", subjectConfirmationData.getInResponseTo());
        assertEquals(XMLTimeUtil.parse("2010-11-04T00:19:16.842-05:00"), subjectConfirmationData.getNotBefore());
        assertEquals(XMLTimeUtil.parse("2010-11-04T00:19:16.842-05:00"), subjectConfirmationData.getNotOnOrAfter());
        assertEquals("http://localhost:8080/employee/", subjectConfirmationData.getRecipient());
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.assertion.SubjectConfirmationType

        NameIDType subjectNameID = (NameIDType) subject.getSubType().getBaseID();

        assertEquals("jduke", subjectNameID.getValue());
        assertEquals("urn:picketlink:identity-federation", subjectNameID.getNameQualifier());

        SubjectConfirmationType subjectConfirmationType = subject.getConfirmation().get(0);
        assertEquals(JBossSAMLURIConstants.BEARER.get(), subjectConfirmationType.getMethod());

        /*
         * List<JAXBElement<?>> content = subject.getContent();
         *
         * int size = content.size();
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.