/** * Gets the attribute IDs for those attributes requested in the entity metadata. * * @param metadata the entity metadata * * @return attribute IDs for those attributes requested in the entity metadata */ protected Set<String> getAttribtueIds(EntityDescriptor metadata) { Set<String> metadataAttributeIds = new HashSet<String>(); AttributeAuthorityDescriptor aaDescriptor; if (metadata != null) { aaDescriptor = metadata.getAttributeAuthorityDescriptor(SAMLConstants.SAML20P_NS); if (aaDescriptor != null) { List<org.opensaml.saml2.core.Attribute> metadataAttributes = aaDescriptor.getAttributes(); metadataAttributeIds = getAttributeIds(metadataAttributes); log.debug("metadata contains the following attributes: {}", metadataAttributeIds); } } return metadataAttributeIds; }