Package org.opensaml.saml2.common.impl

Examples of org.opensaml.saml2.common.impl.ExtensionsBuilder.buildObject()


        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);
View Full Code Here


            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

    }


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

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

        XMLObjectBuilderFactory builderFactory = Configuration.getBuilderFactory();

        /* prepare the response */

        ResponseBuilder responseBuilder = (ResponseBuilder) builderFactory.getBuilder(Response.DEFAULT_ELEMENT_NAME);
        Response response = responseBuilder.buildObject();

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

        /* prepare the Response object to return */

        // build a response object
        ResponseBuilder responseBuilder = (ResponseBuilder) builderFactory.getBuilder(Response.DEFAULT_ELEMENT_NAME);
        Response response = responseBuilder.buildObject();

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

        /* 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

        /* 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

        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

        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();

        statusCode.setValue(StatusCode.SUCCESS_URI);

        status.setStatusCode(statusCode);
View Full Code Here

            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

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.