Examples of IndexedEndpoint


Examples of org.opensaml.saml2.metadata.IndexedEndpoint

*/
public class IndexedEndpointUnmarshaller extends EndpointUnmarshaller {

    /** {@inheritDoc} */
    protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
        IndexedEndpoint iEndpoint = (IndexedEndpoint) samlObject;

        if (attribute.getLocalName().equals(IndexedEndpoint.INDEX_ATTRIB_NAME)) {
            iEndpoint.setIndex(Integer.valueOf(attribute.getValue()));
        } else if (attribute.getLocalName().equals(IndexedEndpoint.IS_DEFAULT_ATTRIB_NAME)) {
            iEndpoint.setIsDefault(XSBooleanValue.valueOf(attribute.getValue()));
        } else {
            super.processAttribute(samlObject, attribute);
        }
    }
View Full Code Here

Examples of org.opensaml.saml2.metadata.IndexedEndpoint

     * @return appropriate endpoint from a list of indexed endpoints or null
     */
    protected Endpoint selectIndexedEndpoint(List<IndexedEndpoint> endpoints) {
        List<IndexedEndpoint> endpointsCopy = new ArrayList<IndexedEndpoint>(endpoints);
        Iterator<IndexedEndpoint> endpointItr = endpointsCopy.iterator();
        IndexedEndpoint firstNoDefaultEndpoint = null;
        IndexedEndpoint currentEndpoint;
        while (endpointItr.hasNext()) {
            currentEndpoint = endpointItr.next();

            // endpoint is the default endpoint
            if (currentEndpoint.isDefault() != null) {
                if (currentEndpoint.isDefault()) {
                    return currentEndpoint;
                }

                if (firstNoDefaultEndpoint == null) {
                    firstNoDefaultEndpoint = currentEndpoint;
View Full Code Here

Examples of org.opensaml.saml2.metadata.IndexedEndpoint

    }

    /** {@inheritDoc} */
    public SAML2ArtifactType0004 buildArtifact(SAMLMessageContext<SAMLObject, SAMLObject, NameID> requestContext) {
        try {
            IndexedEndpoint acsEndpoint = (IndexedEndpoint) getAcsEndpoint(requestContext);
            if (acsEndpoint == null) {
                return null;
            }

            byte[] endpointIndex = DatatypeHelper.intToByteArray(acsEndpoint.getIndex());
            byte[] trimmedIndex = new byte[2];
            trimmedIndex[0] = endpointIndex[2];
            trimmedIndex[1] = endpointIndex[3];

            MessageDigest sha1Digester = MessageDigest.getInstance("SHA-1");
View Full Code Here

Examples of org.opensaml.saml2.metadata.IndexedEndpoint

*/
public class IndexedEndpointMarshaller extends EndpointMarshaller {

    /** {@inheritDoc} */
    public void marshallAttributes(XMLObject samlObject, Element domElement) {
        IndexedEndpoint iEndpoint = (IndexedEndpoint) samlObject;

        if (iEndpoint.getIndex() != null) {
            domElement.setAttributeNS(null, IndexedEndpoint.INDEX_ATTRIB_NAME, iEndpoint.getIndex().toString());
        }

        if (iEndpoint.isDefaultXSBoolean() != null) {
            domElement.setAttributeNS(null, IndexedEndpoint.IS_DEFAULT_ATTRIB_NAME, iEndpoint.isDefaultXSBoolean()
                    .toString());
        }

        super.marshallAttributes(samlObject, domElement);
    }
View Full Code Here

Examples of org.opensaml.saml2.metadata.IndexedEndpoint

        super(targetNamespaceURI, targetLocalName);
    }

    /** {@inheritDoc} */
    protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
        IndexedEndpoint iEndpoint = (IndexedEndpoint) samlObject;

        if (attribute.getLocalName().equals(IndexedEndpoint.INDEX_ATTRIB_NAME)) {
            iEndpoint.setIndex(Integer.valueOf(attribute.getValue()));
        } else if (attribute.getLocalName().equals(IndexedEndpoint.IS_DEFAULT_ATTRIB_NAME)) {
            iEndpoint.setIsDefault(XSBooleanValue.valueOf(attribute.getValue()));
        } else {
            super.processAttribute(samlObject, attribute);
        }
    }
View Full Code Here

Examples of org.opensaml.saml2.metadata.IndexedEndpoint

        super(targetNamespaceURI, targetLocalName);
    }

    /** {@inheritDoc} */
    public void marshallAttributes(XMLObject samlObject, Element domElement) {
        IndexedEndpoint iEndpoint = (IndexedEndpoint) samlObject;

        if (iEndpoint.getIndex() != null) {
            domElement.setAttributeNS(null, IndexedEndpoint.INDEX_ATTRIB_NAME, iEndpoint.getIndex().toString());
        }

        if (iEndpoint.isDefaultXSBoolean() != null) {
            domElement.setAttributeNS(null, IndexedEndpoint.IS_DEFAULT_ATTRIB_NAME, iEndpoint.isDefaultXSBoolean().toString());
        }

        super.marshallAttributes(samlObject, domElement);
    }
View Full Code Here

Examples of org.opensaml.saml2.metadata.IndexedEndpoint

     * @return appropriate endpoint from a list of indexed endpoints or null
     */
    protected Endpoint selectIndexedEndpoint(List<IndexedEndpoint> endpoints) {
        List<IndexedEndpoint> endpointsCopy = new ArrayList<IndexedEndpoint>(endpoints);
        Iterator<IndexedEndpoint> endpointItr = endpointsCopy.iterator();
        IndexedEndpoint firstNoDefaultEndpoint = null;
        IndexedEndpoint currentEndpoint;
        while (endpointItr.hasNext()) {
            currentEndpoint = endpointItr.next();

            // endpoint is the default endpoint
            if (currentEndpoint.isDefault() != null) {
                if (currentEndpoint.isDefault()) {
                    return currentEndpoint;
                }

                if (firstNoDefaultEndpoint == null) {
                    firstNoDefaultEndpoint = currentEndpoint;
View Full Code Here

Examples of org.opensaml.saml2.metadata.IndexedEndpoint

    }

    /** {@inheritDoc} */
    public SAML2ArtifactType0004 buildArtifact(SAMLMessageContext<SAMLObject, SAMLObject, NameID> requestContext) {
        try {
            IndexedEndpoint acsEndpoint = (IndexedEndpoint) getAcsEndpoint(requestContext);
            byte[] endpointIndex = DatatypeHelper.intToByteArray(acsEndpoint.getIndex());
            byte[] trimmedIndex = new byte[2];
            trimmedIndex[0] = endpointIndex[2];
            trimmedIndex[1] = endpointIndex[3];

            MessageDigest sha1Digester = MessageDigest.getInstance("SHA-1");
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.