Package org.springframework.security.saml

Examples of org.springframework.security.saml.SAMLCredential


        Assertion attributeAssertion = helper.getValidAssertion();
        attributeAssertion.getAttributeStatements().add(helper.getAttributeStatement("assertion2", "value2"));
        validResponse.getAssertions().add(attributeAssertion);
        messageContext.setInboundSAMLMessage(validResponse);
        messageContext.setInboundSAMLMessageAuthenticated(true);
        SAMLCredential samlCredential = profile.processAuthenticationResponse(messageContext);
        assertTrue(samlCredential.getAttributes().size() == 1);
    }
View Full Code Here


        attributeAssertion.getAttributeStatements().add(helper.getAttributeStatement("assertion2", "value2"));
        validResponse.getAssertions().add(attributeAssertion);
        messageContext.setInboundSAMLMessage(validResponse);
        messageContext.setInboundSAMLMessageAuthenticated(true);
        profile.setIncludeAllAttributes(true);
        SAMLCredential samlCredential = profile.processAuthenticationResponse(messageContext);
        assertTrue(samlCredential.getAttributes().size() == 2);
    }
View Full Code Here

            subjectAssertion.releaseDOM();
            subjectAssertion.releaseChildrenDOM(true);
        }

        // Create the credential
        return new SAMLCredential(nameId, subjectAssertion, context.getPeerEntityMetadata().getEntityID(), context.getRelayState(), attributes, context.getLocalEntityId(), additionalData);

    }
View Full Code Here

        // Log NameID or principal when available
        sb.append(";");
        if (a != null) {
            if (a.getCredentials() != null && a.getCredentials() instanceof SAMLCredential) {
                SAMLCredential credential = (SAMLCredential) a.getCredentials();
                if (credential.getNameID() != null) {
                    sb.append(credential.getNameID().getValue());
                } else {
                    sb.append(a.getPrincipal());
                }
            } else {
                sb.append(a.getPrincipal());
View Full Code Here

TOP

Related Classes of org.springframework.security.saml.SAMLCredential

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.