/** {@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); } }
if (endpoint.isDefault()) { log.debug("Selected IndexedEndpoint with explicit isDefault of true"); return endpoint; if (firstNoDefault == null && endpoint.isDefaultXSBoolean() == null) { firstNoDefault = endpoint;
/** {@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); } } }
protected List<Endpoint> getEndpoints( List<? extends org.opensaml.saml.saml2.metadata.Endpoint> services ) { List<Endpoint> result = new LinkedList<>(); if (services != null) { services .stream() .forEach(s -> { Endpoint endpoint = new Endpoint() .setBinding(Binding.fromUrn(s.getBinding())) .setLocation(s.getLocation()) .setResponseLocation(s.getResponseLocation()); result.add(endpoint); if (s instanceof IndexedEndpoint) { IndexedEndpoint idxEndpoint = (IndexedEndpoint) s; endpoint .setIndex(idxEndpoint.getIndex()) .setDefault(idxEndpoint.isDefault()); } } ); } return result; }
for (final Endpoint endpoint : candidates) { if (hardDefault == null && endpoint instanceof IndexedEndpoint) { final Boolean flag = ((IndexedEndpoint) endpoint).isDefault(); if (flag != null) { if (flag.booleanValue()) {
&& ((IndexedEndpoint) comparisonEndpoint).getIndex() != null) { if (!(endpoint instanceof IndexedEndpoint)) { log.debug("{} Candidate endpoint was not indexed, so did not match", getLogPrefix()); return false; } else if (!Objects.equals(((IndexedEndpoint) comparisonEndpoint).getIndex(), ((IndexedEndpoint) endpoint).getIndex())) { log.debug("{} Candidate endpoint index {} did not match {}", getLogPrefix(), ((IndexedEndpoint) endpoint).getIndex(), ((IndexedEndpoint) comparisonEndpoint).getIndex()); return false;
endpoint.setBinding(((AuthnRequest) inboundMessage).getProtocolBinding()); if (endpoint instanceof IndexedEndpoint) { ((IndexedEndpoint) endpoint).setIndex( ((AuthnRequest) inboundMessage).getAssertionConsumerServiceIndex());