Examples of buildObject()


Examples of org.opensaml.saml2.core.impl.IssuerBuilder.buildObject()

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

            //Set the issuer
            IssuerBuilder issuerBuilder = new IssuerBuilder();
            Issuer issuer = issuerBuilder.buildObject();
            issuer.setValue(config.issuerName);
            assertion.setIssuer(issuer);

            // Set the issued time.
            assertion.setIssueInstant(new DateTime());
View Full Code Here

Examples of org.opensaml.saml2.core.impl.NameIDBuilder.buildObject()

            try {
                String subjectNameId = data.getPrincipal().getName();

                //Create NameID and attach it to the subject
                NameIDBuilder nb = new NameIDBuilder();
                NameID nameID = nb.buildObject();
                nameID.setValue(subjectNameId);
                nameID.setFormat(NameIdentifier.EMAIL);
                subject.setNameID(nameID);

View Full Code Here

Examples of org.opensaml.saml2.core.impl.ResponseBuilder.buildObject()

    }


    public ErrorResponseBuilder() {
        ResponseBuilder responseBuilder = new ResponseBuilder();
        this.response = responseBuilder.buildObject();
    }

    /**
     * Build the error response
     *
 
View Full Code Here

Examples of org.opensaml.saml2.core.impl.StatusBuilder.buildObject()

        /* add the Status element */

        // build a status object
        StatusBuilder statusBuilder = (StatusBuilder) builderFactory.getBuilder(Status.DEFAULT_ELEMENT_NAME);
        Status status = statusBuilder.buildObject();

        // build a status code object
        StatusCodeBuilder statusCodeBuilder = (StatusCodeBuilder) builderFactory.getBuilder(StatusCode.DEFAULT_ELEMENT_NAME);
        StatusCode statusCode = statusCodeBuilder.buildObject();

View Full Code Here

Examples of org.opensaml.saml2.core.impl.StatusCodeBuilder.buildObject()

        StatusBuilder statusBuilder = (StatusBuilder) builderFactory.getBuilder(Status.DEFAULT_ELEMENT_NAME);
        Status status = statusBuilder.buildObject();

        // build a status code object
        StatusCodeBuilder statusCodeBuilder = (StatusCodeBuilder) builderFactory.getBuilder(StatusCode.DEFAULT_ELEMENT_NAME);
        StatusCode statusCode = statusCodeBuilder.buildObject();

        // TODO now discriminates by exception but the code must be improved

        if (e instanceof VersionMismatchException) {
View Full Code Here

Examples of org.opensaml.saml2.core.impl.StatusMessageBuilder.buildObject()

            if (e.getMessage() != null) {

                StatusMessageBuilder statusMessageBuilder = (StatusMessageBuilder) builderFactory.getBuilder(StatusMessage.DEFAULT_ELEMENT_NAME);

                StatusMessage statusMessage = statusMessageBuilder.buildObject();

                statusMessage.setMessage(e.getMessage());

                // add StatusMessage to Status
                status.setStatusMessage(statusMessage);
View Full Code Here

Examples of org.opensaml.xacml.profile.saml.impl.XACMLPolicyQueryTypeImplBuilder.buildObject()

        XMLObjectBuilderFactory bf = Configuration.getBuilderFactory();

        XACMLPolicyQueryTypeImplBuilder builder = (XACMLPolicyQueryTypeImplBuilder) bf.getBuilder(XACMLPolicyQueryType.DEFAULT_ELEMENT_NAME_XACML20);

        // TODO: submit bug to opensaml ?
        XACMLPolicyQueryType policyQuery = builder.buildObject(XACMLPolicyQueryType.DEFAULT_ELEMENT_NAME_XACML20.getNamespaceURI(),
                                                               XACMLPolicyQueryType.DEFAULT_ELEMENT_NAME_XACML20.getLocalPart(),
                                                               XACMLPolicyQueryType.DEFAULT_ELEMENT_NAME_XACML20.getPrefix());

        IssuerBuilder issuerBuilder = (IssuerBuilder) bf.getBuilder(Issuer.DEFAULT_ELEMENT_NAME);
View Full Code Here

Examples of org.opensaml.xacml.profile.saml.impl.XACMLPolicyStatementTypeImplBuilder.buildObject()

        /* build policy statements objects */

        XACMLPolicyStatementTypeImplBuilder policyStatementBuilder = (XACMLPolicyStatementTypeImplBuilder) builderFactory.getBuilder(XACMLPolicyStatementType.TYPE_NAME_XACML20);

        XACMLPolicyStatementType policyStatement = policyStatementBuilder.buildObject(Statement.DEFAULT_ELEMENT_NAME,
                                                                                      XACMLPolicyStatementType.TYPE_NAME_XACML20);

        Iterator<XACMLObject> iterator = policyObjects.iterator();

        while (iterator.hasNext()) {
View Full Code Here

Examples of org.opensaml.xml.XMLObjectBuilder.buildObject()

                log.trace("No builder was registered for {} but the default builder {} was available, using it.",
                        XMLHelper.getNodeQName(domElement), xmlObjectBuilder.getClass().getName());
            }
        }

        return xmlObjectBuilder.buildObject(domElement);
    }

    /**
     * Unmarshalls the attributes from the given DOM Attr into the given XMLObject. If the attribute is an XML namespace
     * declaration the attribute is passed to
View Full Code Here

Examples of org.opensaml.xml.schema.impl.XSBase64BinaryBuilder.buildObject()

            // TODO remove this else if condition after WSO2 IS supports claim
            // types properly
            if (claim.getUri().equals(IdentityConstants.CLAIM_PPID)) {
                XSBase64BinaryBuilder ppidValueBuilder = (XSBase64BinaryBuilder) builderFactory
                        .getBuilder(XSBase64Binary.TYPE_NAME);
                XSBase64Binary ppidValue = ppidValueBuilder.buildObject(
                        AttributeValue.DEFAULT_ELEMENT_NAME, XSBase64Binary.TYPE_NAME);
                ppidValue.setValue(claim.getValue());
                attribute.getAttributeValues().add(ppidValue);
            } else {
                XSStringBuilder attributeValueBuilder = (XSStringBuilder) builderFactory
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.