Class SAMLMetadataSupport

java.lang.Object
net.shibboleth.metadata.dom.saml.SAMLMetadataSupport

@ThreadSafe public final class SAMLMetadataSupport extends Object
Helper class for dealing with SAML metadata.
  • Field Details

    • MD_NS

      @Nonnull public static final String MD_NS
      SAML Metadata namespace URI.
      See Also:
    • MD_PREFIX

      @Nonnull public static final String MD_PREFIX
      Default SAML Metadata namespace prefix.
      See Also:
    • ENTITIES_DESCRIPTOR_NAME

      @Nonnull public static final QName ENTITIES_DESCRIPTOR_NAME
      EntitiesDescriptor element name.
    • ENTITY_DESCRIPTOR_NAME

      @Nonnull public static final QName ENTITY_DESCRIPTOR_NAME
      EntityDescriptor element name.
    • EXTENSIONS_NAME

      @Nonnull public static final QName EXTENSIONS_NAME
      Extensions element name.
    • VALID_UNTIL_ATTRIB_NAME

      @Nonnull public static final QName VALID_UNTIL_ATTRIB_NAME
      validUntil attribute name.
    • CACHE_DURATION_ATTRIB_NAME

      @Nonnull public static final QName CACHE_DURATION_ATTRIB_NAME
      cacheDuration attribute name.
    • ENTITYID_ATTRIB_NAME

      @Nonnull public static final QName ENTITYID_ATTRIB_NAME
      entityID attribute name.
    • ROLE_DESCRIPTOR_NAME

      @Nonnull public static final QName ROLE_DESCRIPTOR_NAME
      QName of the RoleDescriptor element.
      Since:
      0.10.0
    • IDP_SSO_DESCRIPTOR_NAME

      @Nonnull public static final QName IDP_SSO_DESCRIPTOR_NAME
      QName of the IDPSSODescriptor element.
      Since:
      0.10.0
    • SP_SSO_DESCRIPTOR_NAME

      @Nonnull public static final QName SP_SSO_DESCRIPTOR_NAME
      QName of the SPSSODescriptor element.
      Since:
      0.10.0
    • AUTHN_AUTHORITY_DESCRIPTOR_NAME

      @Nonnull public static final QName AUTHN_AUTHORITY_DESCRIPTOR_NAME
      QName of the AuthnAuthorityDescriptor element.
      Since:
      0.10.0
    • ATTRIBUTE_AUTHORITY_DESCRIPTOR_NAME

      @Nonnull public static final QName ATTRIBUTE_AUTHORITY_DESCRIPTOR_NAME
      QName of the AttributeAuthorityDescriptor element.
      Since:
      0.10.0
    • PDP_DESCRIPTOR_NAME

      @Nonnull public static final QName PDP_DESCRIPTOR_NAME
      QName of the PDPDescriptor element.
      Since:
      0.10.0
    • ORGANIZATION_NAME

      @Nonnull public static final QName ORGANIZATION_NAME
      QName of the Organization element.
      Since:
      0.10.0
    • ORGANIZATIONNAME_NAME

      @Nonnull public static final QName ORGANIZATIONNAME_NAME
      QName of the OrganizationName element.
      Since:
      0.10.0
    • ORGANIZATIONDISPLAYNAME_NAME

      @Nonnull public static final QName ORGANIZATIONDISPLAYNAME_NAME
      QName of the OrganizationDisplayName element.
      Since:
      0.10.0
    • ORGANIZATIONURL_NAME

      @Nonnull public static final QName ORGANIZATIONURL_NAME
      QName of the OrganizationURL element.
      Since:
      0.10.0
  • Constructor Details

    • SAMLMetadataSupport

      private SAMLMetadataSupport()
      Constructor.
  • Method Details

    • isEntityOrEntitiesDescriptor

      public static boolean isEntityOrEntitiesDescriptor(@Nonnull Element e)
      Check if the given element is an EntityDescriptor or EntitiesDescriptor.
      Parameters:
      e - element to check
      Returns:
      true if the element is an EntityDescriptor or EntitiesDescriptor
    • isEntitiesDescriptor

      public static boolean isEntitiesDescriptor(@Nonnull Element e)
      Checks if the given element is an EntitiesDescriptor.
      Parameters:
      e - element to check
      Returns:
      true if the element is an EntitiesDescriptor, false otherwise
    • isEntityDescriptor

      public static boolean isEntityDescriptor(@Nonnull Element e)
      Checks if the given element is an EntityDescriptor.
      Parameters:
      e - element to check
      Returns:
      true if the element is an EntityDescriptor, false otherwise
    • getDescriptorExtensionList

      @Nonnull public static List<Element> getDescriptorExtensionList(@Nonnull Element descriptor, @Nonnull QName extensionName)
      Gets a list of all instances of an extension element for a given descriptor. An empty list is returned if the descriptor has no extensions, or if it has no extensions of the requested type.
      Parameters:
      descriptor - the descriptor, never null
      extensionName - name of the extension element, never null
      Returns:
      a possibly empty list of all extension instances
    • getDescriptorExtension

      public static Element getDescriptorExtension(@Nonnull Element descriptor, @Nonnull QName extensionName)
      Gets the first instance of an extension element for a given descriptor.
      Parameters:
      descriptor - the descriptor, never null
      extensionName - the name of the extension element, never null
      Returns:
      the first instance of the extension element or null if no such element exists as an extension of the descriptor
      Since:
      0.10.0
    • getEntityID

      @Nullable public static String getEntityID(@Nonnull Element entity)
      Return the entityID attribute from an entity descriptor, or null if it doesn't have one.
      Parameters:
      entity - Element from which to extract the entityID
      Returns:
      the entityID, or null