Package org.opensaml.saml1.core.impl

Examples of org.opensaml.saml1.core.impl.AssertionBuilder


                    transformAuthenticationMethod(statementBean.getAuthenticationMethod())
                );
               
                SubjectLocalityBean subjectLocalityBean = statementBean.getSubjectLocality();
                if (subjectLocalityBean != null) {
                    SubjectLocality subjectLocality = subjectLocalityBuilder.buildObject();
                    subjectLocality.setDNSAddress(subjectLocalityBean.getDnsAddress());
                    subjectLocality.setIPAddress(subjectLocalityBean.getIpAddress());

                    authenticationStatement.setSubjectLocality(subjectLocality);
                }
               
                authenticationStatements.add(authenticationStatement);
View Full Code Here


        Assertion assertion = getAssertionObjectFromOMElement(elem);
        List<AuthenticationStatement> authStmts = assertion.getAuthenticationStatements();
        assertNotNull("At least one Authentication Statement should be present in the assertion",
                   authStmts.get(0));

        SubjectStatement authStmt = authStmts.get(0);
        List<ConfirmationMethod> subConfirmationMethods = authStmt.getSubject().
                getSubjectConfirmation().getConfirmationMethods();
        assertNotNull("At least one Subject Confirmation method should be present in the SAML Subject",
                   subConfirmationMethods.get(0));
        assertEquals("Subject Confirmation should be BEARER : urn:oasis:names:tc:SAML:1.0:cm:bearer",
                         RahasConstants.SAML11_SUBJECT_CONFIRMATION_BEARER,
View Full Code Here

            String keyType = data.getKeyType();

            keySize = (keySize == -1) ? config.keySize : keySize;

            //Build the assertion
            AssertionBuilder assertionBuilder = new AssertionBuilder();
            Assertion assertion = assertionBuilder.buildObject();
            assertion.setVersion(SAMLVersion.VERSION_20);

            // Set an UUID as the ID of an assertion
            assertion.setID(UUIDGenerator.getUUID());
View Full Code Here

      String keyType = data.getKeyType();

      keySize = (keySize == -1) ? config.keySize : keySize;

      // Build the assertion
      AssertionBuilder assertionBuilder = new AssertionBuilder();
      Assertion assertion = assertionBuilder.buildObject();
      assertion.setVersion(SAMLVersion.VERSION_20);

      // Set an UUID as the ID of an assertion
      assertion.setID(UUIDGenerator.getUUID());
View Full Code Here

        return assertion;
    }

    private Assertion createAssertion(Subject subject) {
        Assertion assertion = (new AssertionBuilder()).buildObject();
        try {
            SecureRandomIdentifierGenerator generator = new SecureRandomIdentifierGenerator();
            assertion.setID(generator.generateIdentifier());
        } catch (NoSuchAlgorithmException e) {
            LOG.log(Level.WARNING, e.getMessage(), e);
View Full Code Here

    }

    private Assertion buildSAMLAssertion(SAMLSSOAuthnReqDTO authReqDTO, DateTime notOnOrAfter, String sessionId) throws IdentityException {
        try {
            DateTime currentTime = new DateTime();
            Assertion samlAssertion = new AssertionBuilder().buildObject();
            samlAssertion.setID(SAMLSSOUtil.createID());
            samlAssertion.setVersion(SAMLVersion.VERSION_20);
            samlAssertion.setIssuer(SAMLSSOUtil.getIssuer());
            samlAssertion.setIssueInstant(currentTime);
            Subject subject = new SubjectBuilder().buildObject();
View Full Code Here

            String keyType = data.getKeyType();

            keySize = (keySize == -1) ? config.keySize : keySize;

            //Build the assertion
            AssertionBuilder assertionBuilder = new AssertionBuilder();
            Assertion assertion = assertionBuilder.buildObject();
            assertion.setVersion(SAMLVersion.VERSION_20);

            // Set an UUID as the ID of an assertion
            assertion.setID(UUIDGenerator.getUUID());
View Full Code Here

        response.setInResponseTo(inResponseTo.getID());

        /* add the Assertion element */

        // build an assertion object
        AssertionBuilder assertionBuilder = (AssertionBuilder) builderFactory.getBuilder(Assertion.DEFAULT_ELEMENT_NAME);
        Assertion assertion = assertionBuilder.buildObject();

        // set a few attributes for the assertion
        assertion.setID("_" + UUID.randomUUID().toString());
        assertion.setVersion(SAMLVersion.VERSION_20);
        assertion.setIssueInstant(new DateTime());
View Full Code Here

        response = createMock(HttpServletResponse.class);

        authentication = createMock(Authentication.class);

        NameIDBuilder nameIDBuilder = new NameIDBuilder();
        AssertionBuilder assertionBuilder = new AssertionBuilder();
        List<Attribute> attrs = Collections.emptyList();

        credential = new SAMLCredential(
                nameIDBuilder.buildObject("uri:the-namespace", "localName", "prefix"),
                assertionBuilder.buildObject("uri:the-namespace", "localName", "prefix"),
                "remoteEntityID", "relayState", attrs, "localEntityID");

        redirectStrategy = createMock(RedirectStrategy.class);

        successHandler = new SAMLRelayStateSuccessHandler();
View Full Code Here

            String keyType = data.getKeyType();

            keySize = (keySize == -1) ? config.keySize : keySize;

            //Build the assertion
            AssertionBuilder assertionBuilder = new AssertionBuilder();
            Assertion assertion = assertionBuilder.buildObject();
            assertion.setVersion(SAMLVersion.VERSION_20);

            // Set an UUID as the ID of an assertion
            assertion.setID(UUIDGenerator.getUUID());
View Full Code Here

TOP

Related Classes of org.opensaml.saml1.core.impl.AssertionBuilder

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.