Package org.opensaml.saml1.core

Examples of org.opensaml.saml1.core.AssertionArtifact


                    "OpenSaml engine not initialized. Please make sure to initialize the OpenSaml "
                    + "engine prior using it"
                );
            }
        }
        Assertion assertion =
            assertionV1Builder.buildObject(
                Assertion.DEFAULT_ELEMENT_NAME,
                Assertion.TYPE_NAME
            );
        assertion.setVersion(SAMLVersion.VERSION_11);
        assertion.setIssuer(issuer);
        assertion.setIssueInstant(new DateTime()); // now
        assertion.setID("_" + UUIDGenerator.getUUID());
        return assertion;
    }
View Full Code Here


*/
public class AssertionArtifactUnmarshaller extends AbstractSAMLObjectUnmarshaller {

    /** {@inheritDoc} */
    protected void processElementContent(XMLObject samlObject, String elementContent) {
        AssertionArtifact assertionArtifact = (AssertionArtifact) samlObject;

        assertionArtifact.setAssertionArtifact(elementContent);
    }
View Full Code Here

*/
public class AssertionArtifactMarshaller extends AbstractSAMLObjectMarshaller {

    /** {@inheritDoc} */
    protected void marshallElementContent(XMLObject samlObject, Element domElement) throws MarshallingException {
        AssertionArtifact assertionArtifact = (AssertionArtifact) samlObject;
        if (assertionArtifact.getAssertionArtifact() != null) {
            XMLHelper.appendTextContent(domElement, assertionArtifact.getAssertionArtifact());
        }
    }
View Full Code Here

        if (artifacts.size() == 0) {
            return;
        }

        log.debug("Attempting to extract issuer based on first AssertionArtifact in request");
        AssertionArtifact artifact = artifacts.get(0);
        SAMLArtifactMapEntry artifactEntry = artifactMap.get(artifact.getAssertionArtifact());
        messageContext.setInboundMessageIssuer(artifactEntry.getRelyingPartyId());

        log.debug("Extracted issuer from SAML 1.x AssertionArtifact: {}", messageContext.getInboundMessageIssuer());
    }
View Full Code Here

        super(SAMLConstants.SAML10P_NS, AssertionArtifact.DEFAULT_ELEMENT_LOCAL_NAME);
    }

    /** {@inheritDoc} */
    protected void marshallElementContent(XMLObject samlObject, Element domElement) throws MarshallingException {
        AssertionArtifact assertionArtifact = (AssertionArtifact) samlObject;
        if (assertionArtifact.getAssertionArtifact() != null) {
            XMLHelper.appendTextContent(domElement,assertionArtifact.getAssertionArtifact());
        }
    }
View Full Code Here

        if (artifacts.size() == 0) {
            return;
        }

        log.debug("Attempting to extract issuer based on first AssertionArtifact in request");
        AssertionArtifact artifact = artifacts.get(0);
        SAMLArtifactMapEntry artifactEntry = artifactMap.get(artifact.getAssertionArtifact());
        messageContext.setInboundMessageIssuer(artifactEntry.getRelyingPartyId());

        log.debug("Extracted issuer from SAML 1.x AssertionArtifact: {}", messageContext.getInboundMessageIssuer());
    }
View Full Code Here

        super(SAMLConstants.SAML10P_NS, AssertionArtifact.DEFAULT_ELEMENT_LOCAL_NAME);
    }

    /** {@inheritDoc} */
    protected void processElementContent(XMLObject samlObject, String elementContent) {
        AssertionArtifact assertionArtifact = (AssertionArtifact) samlObject;

        assertionArtifact.setAssertionArtifact(elementContent);
    }
View Full Code Here

                    List<?> attributeValues = values.getAttributeValues();
                    if (attributeValues == null || attributeValues.isEmpty()) {
                        attributeValues = values.getCustomAttributeValues();
                    }
                   
                    Attribute samlAttribute =
                        createSamlv1Attribute(
                            values.getSimpleName(),
                            values.getQualifiedName(),
                            attributeValues
                        );
View Full Code Here

        }
        if (stringBuilder == null) {
            stringBuilder = (XSStringBuilder)builderFactory.getBuilder(XSString.TYPE_NAME);
        }

        Attribute attribute = attributeV1Builder.buildObject();
        attribute.setAttributeName(attributeName);
        attribute.setAttributeNamespace(attributeUrn);
       
        for (Object value : values) {
            if (value instanceof String) {
                XSString attribute1 =
                    stringBuilder.buildObject(AttributeValue.DEFAULT_ELEMENT_NAME, XSString.TYPE_NAME);
                attribute1.setValue((String)value);
                attribute.getAttributeValues().add(attribute1);
            } else if (value instanceof XMLObject) {
                attribute.getAttributeValues().add((XMLObject)value);
            }
        }

        return attribute;
    }
View Full Code Here

            int index = uri.lastIndexOf("/");
            String attrName = uri.substring(index + 1, uri.length());
            String attrNamespace = uri.substring(0, index);

            Attribute attribute = (Attribute) buildXMLObject(Attribute.DEFAULT_ELEMENT_NAME);
            attribute.setAttributeName(attrName);
            attribute.setAttributeNamespace(attrNamespace);

            XMLObjectBuilderFactory builderFactory = Configuration.getBuilderFactory();
            XSStringBuilder attributeValueBuilder = (XSStringBuilder) builderFactory
                    .getBuilder(XSString.TYPE_NAME);

            XSString stringValue = attributeValueBuilder.buildObject(
                    AttributeValue.DEFAULT_ELEMENT_NAME, XSString.TYPE_NAME);
            stringValue.setValue(claim.getValue());
            attribute.getAttributeValues().add(stringValue);

            attributeStmt.getAttributes().add(attribute);
        }
    }
View Full Code Here

TOP

Related Classes of org.opensaml.saml1.core.AssertionArtifact

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.