Package org.jboss.identity.federation.saml.v2.protocol

Examples of org.jboss.identity.federation.saml.v2.protocol.StatusType


        // Issuer
        assertEquals("testIssuer", response.getIssuer().getValue());

        // Status
        StatusType status = response.getStatus();
        assertEquals("urn:oasis:names:tc:SAML:2.0:status:Success", status.getStatusCode().getValue().toString());

        List<RTChoiceType> assertionList = response.getAssertions();
        assertEquals(2, assertionList.size());

        AssertionType assertion1 = assertionList.get(0).getAssertion();
View Full Code Here


        // Issuer
        assertEquals("http://localhost:8080/idp/", response.getIssuer().getValue());

        // Status
        StatusType status = response.getStatus();
        assertEquals("urn:oasis:names:tc:SAML:2.0:status:Success", status.getStatusCode().getValue().toString());

        // Get the assertion
        AssertionType assertion = response.getAssertions().get(0).getAssertion();
        assertEquals("ID_8be1534d-9155-4837-9f26-70ea2c15e327", assertion.getID());
        assertEquals(XMLTimeUtil.parse("2010-11-04T00:19:16.842-05:00"), assertion.getIssueInstant());
View Full Code Here

        // Issuer
        assertEquals("http://localhost:8080/employee-post/", response.getIssuer().getValue());

        // Status
        StatusType status = response.getStatus();
        assertEquals("urn:oasis:names:tc:SAML:2.0:status:Responder", status.getStatusCode().getValue().toString());
        assertEquals("urn:oasis:names:tc:SAML:2.0:status:Success", status.getStatusCode().getStatusCode().getValue().toString());

        // Let us do some writing - currently only visual inspection. We will do proper validation later.
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        SAMLResponseWriter writer = new SAMLResponseWriter(StaxUtil.getXMLStreamWriter(baos));
        writer.write(response, new QName(PROTOCOL_NSURI.get(), LOGOUT_RESPONSE.get(), "samlp"));
View Full Code Here

        // Issuer
        assertEquals("http://localhost:8080/idp-sig/", response.getIssuer().getValue());

        // Status
        StatusType status = response.getStatus();
        assertEquals("urn:oasis:names:tc:SAML:2.0:status:Responder", status.getStatusCode().getValue().toString());
        assertEquals("urn:oasis:names:tc:SAML:2.0:status:Success", status.getStatusCode().getStatusCode().getValue().toString());
    }
View Full Code Here

        // Issuer
        assertEquals("https://saml.salesforce.com", response.getIssuer().getValue());

        // Status
        StatusType status = response.getStatus();
        assertEquals("urn:oasis:names:tc:SAML:2.0:status:Success", status.getStatusCode().getValue().toString());
        assertNull(status.getStatusCode().getStatusCode());
    }
View Full Code Here

        Element sig = response.getSignature();
        if (sig != null) {
            StaxUtil.writeDOMElement(writer, sig);
        }

        StatusType status = response.getStatus();
        write(status);

        List<RTChoiceType> choiceTypes = response.getAssertions();
        if (choiceTypes != null) {
            for (RTChoiceType choiceType : choiceTypes) {
View Full Code Here

        Element sig = response.getSignature();
        if (sig != null) {
            StaxUtil.writeDOMElement(writer, sig);
        }

        StatusType status = response.getStatus();
        if (status != null) {
            write(status);
        }
        Object anyObj = response.getAny();
        if (anyObj instanceof AuthnRequestType) {
View Full Code Here

        writeBaseAttributes(response);

        NameIDType issuer = response.getIssuer();
        write(issuer, new QName(ASSERTION_NSURI.get(), JBossSAMLConstants.ISSUER.get(), ASSERTION_PREFIX));

        StatusType status = response.getStatus();
        write(status);

        StaxUtil.writeEndElement(writer);
        StaxUtil.flush(writer);
    }
View Full Code Here

        private Principal handleSAMLResponse(ResponseType responseType, SAML2HandlerResponse response)
                throws ProcessingException {
            if (responseType == null)
                throw logger.nullArgumentError("response type");

            StatusType statusType = responseType.getStatus();
            if (statusType == null)
                throw logger.nullArgumentError("Status Type from the IDP");

            String statusValue = statusType.getStatusCode().getValue().toASCIIString();
            if (JBossSAMLURIConstants.STATUS_SUCCESS.get().equals(statusValue) == false)
                throw logger.samlHandlerIDPAuthenticationFailedError();

            List<RTChoiceType> assertions = responseType.getAssertions();
            if (assertions.size() == 0)
View Full Code Here

        if (request == null)
            throw new IllegalArgumentException(ErrorCodes.NULL_ARGUMENT + "request");
        if (responseType == null)
            throw new IllegalArgumentException(ErrorCodes.NULL_ARGUMENT + "response type");

        StatusType statusType = responseType.getStatus();
        if (statusType == null)
            throw new IllegalArgumentException(ErrorCodes.NULL_VALUE + "Status Type from the IDP");

        String statusValue = statusType.getStatusCode().getValue().toASCIIString();
        if (JBossSAMLURIConstants.STATUS_SUCCESS.get().equals(statusValue) == false)
            throw new SecurityException(ErrorCodes.IDP_AUTH_FAILED + "IDP forbid the user");

        List<org.picketlink.identity.federation.saml.v2.protocol.ResponseType.RTChoiceType> assertions = responseType
                .getAssertions();
View Full Code Here

TOP

Related Classes of org.jboss.identity.federation.saml.v2.protocol.StatusType

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.