/** {@inheritDoc} */ protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject) throws UnmarshallingException { AffiliationDescriptor descriptor = (AffiliationDescriptor) parentSAMLObject; if (childSAMLObject instanceof Extensions) { descriptor.setExtensions((Extensions) childSAMLObject); } else if (childSAMLObject instanceof Signature) { descriptor.setSignature((Signature) childSAMLObject); } else if (childSAMLObject instanceof AffiliateMember) { descriptor.getMembers().add((AffiliateMember) childSAMLObject); } else if (childSAMLObject instanceof KeyDescriptor) { descriptor.getKeyDescriptors().add((KeyDescriptor) childSAMLObject); } else { super.processChildElement(parentSAMLObject, childSAMLObject); } }
if (descriptor.getOwnerID() != null) { domElement.setAttributeNS(null, AffiliationDescriptor.OWNER_ID_ATTRIB_NAME, descriptor.getOwnerID()); if (descriptor.getID() != null) { domElement.setAttributeNS(null, AffiliationDescriptor.ID_ATTRIB_NAME, descriptor.getID()); domElement.setIdAttributeNS(null, AffiliationDescriptor.ID_ATTRIB_NAME, true); if (descriptor.getValidUntil() != null) { log.debug("Writting validUntil attribute to AffiliationDescriptor DOM element"); String validUntilStr = SAMLConfigurationSupport.getSAMLDateFormatter().print(descriptor.getValidUntil()); domElement.setAttributeNS(null, TimeBoundSAMLObject.VALID_UNTIL_ATTRIB_NAME, validUntilStr); if (descriptor.getCacheDuration() != null) { log.debug("Writting cacheDuration attribute to AffiliationDescriptor DOM element"); String cacheDuration = DOMTypeSupport.longToDuration(descriptor.getCacheDuration()); domElement.setAttributeNS(null, CacheableSAMLObject.CACHE_DURATION_ATTRIB_NAME, cacheDuration);
/** {@inheritDoc} */ protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException { AffiliationDescriptor descriptor = (AffiliationDescriptor) samlObject; if (attribute.getLocalName().equals(AffiliationDescriptor.OWNER_ID_ATTRIB_NAME)) { descriptor.setOwnerID(attribute.getValue()); } else if (attribute.getLocalName().equals(AffiliationDescriptor.ID_ATTRIB_NAME)) { descriptor.setID(attribute.getValue()); attribute.getOwnerElement().setIdAttributeNode(attribute, true); } else if (attribute.getLocalName().equals(TimeBoundSAMLObject.VALID_UNTIL_ATTRIB_NAME) && !Strings.isNullOrEmpty(attribute.getValue())) { descriptor.setValidUntil(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC())); } else if (attribute.getLocalName().equals(CacheableSAMLObject.CACHE_DURATION_ATTRIB_NAME)) { descriptor.setCacheDuration(DOMTypeSupport.durationToLong(attribute.getValue())); } else { processUnknownAttribute(descriptor, attribute); } } }
final AffiliationDescriptor descriptor = affiliation.getAffiliationDescriptor(); if (descriptor != null) { for (final AffiliateMember member : descriptor.getMembers()) { if (Objects.equals(member.getID(), requesterId)) { log.debug("Entity {} is authorized as a member of Affiliation {}", requesterId,
if (!affiliationDescriptor.isSigned()) { log.trace("AffiliationDescriptor member was not signed, skipping signature processing..."); } else { log.trace("Processing signed AffiliationDescriptor member with owner ID: {}", affiliationDescriptor.getOwnerID()); verifySignature(affiliationDescriptor, affiliationDescriptor.getOwnerID(), false); } catch (final FilterException e) { log.error("AffiliationDescriptor with owner ID '{}' subordinate to entity '{}' " + "failed signature verification, removing from metadata provider", affiliationDescriptor.getOwnerID(), entityID); entityDescriptor.setAffiliationDescriptor(null);
rawResult = new HashSet<>(); rawResult.add(((AffiliationDescriptor)input).getOwnerID());