Package net.shibboleth.metadata.dom.saml
Class SAMLMetadataSupport
java.lang.Object
net.shibboleth.metadata.dom.saml.SAMLMetadataSupport
Helper class for dealing with SAML metadata.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final QNameQName of the AttributeAuthorityDescriptor element.static final QNameQName of the AuthnAuthorityDescriptor element.static final QNamecacheDuration attribute name.static final QNameEntitiesDescriptor element name.static final QNameEntityDescriptor element name.static final QNameentityID attribute name.static final QNameExtensions element name.static final QNameQName of the IDPSSODescriptor element.static final StringSAML Metadata namespace URI.static final StringDefault SAML Metadata namespace prefix.static final QNameQName of the Organization element.static final QNameQName of the OrganizationDisplayName element.static final QNameQName of the OrganizationName element.static final QNameQName of the OrganizationURL element.static final QNameQName of the PDPDescriptor element.static final QNameQName of the RoleDescriptor element.static final QNameQName of the SPSSODescriptor element.static final QNamevalidUntil attribute name. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ElementgetDescriptorExtension(Element descriptor, QName extensionName) Gets the first instance of an extension element for a given descriptor.getDescriptorExtensionList(Element descriptor, QName extensionName) Gets a list of all instances of an extension element for a given descriptor.static StringgetEntityID(Element entity) Return theentityIDattribute from an entity descriptor, ornullif it doesn't have one.static booleanChecks if the given element is an EntitiesDescriptor.static booleanChecks if the given element is an EntityDescriptor.static booleanCheck if the given element is an EntityDescriptor or EntitiesDescriptor.
-
Field Details
-
MD_NS
SAML Metadata namespace URI.- See Also:
-
MD_PREFIX
Default SAML Metadata namespace prefix.- See Also:
-
ENTITIES_DESCRIPTOR_NAME
EntitiesDescriptor element name. -
ENTITY_DESCRIPTOR_NAME
EntityDescriptor element name. -
EXTENSIONS_NAME
Extensions element name. -
VALID_UNTIL_ATTRIB_NAME
validUntil attribute name. -
CACHE_DURATION_ATTRIB_NAME
cacheDuration attribute name. -
ENTITYID_ATTRIB_NAME
entityID attribute name. -
ROLE_DESCRIPTOR_NAME
QName of the RoleDescriptor element.- Since:
- 0.10.0
-
IDP_SSO_DESCRIPTOR_NAME
QName of the IDPSSODescriptor element.- Since:
- 0.10.0
-
SP_SSO_DESCRIPTOR_NAME
QName of the SPSSODescriptor element.- Since:
- 0.10.0
-
AUTHN_AUTHORITY_DESCRIPTOR_NAME
QName of the AuthnAuthorityDescriptor element.- Since:
- 0.10.0
-
ATTRIBUTE_AUTHORITY_DESCRIPTOR_NAME
QName of the AttributeAuthorityDescriptor element.- Since:
- 0.10.0
-
PDP_DESCRIPTOR_NAME
QName of the PDPDescriptor element.- Since:
- 0.10.0
-
ORGANIZATION_NAME
QName of the Organization element.- Since:
- 0.10.0
-
ORGANIZATIONNAME_NAME
QName of the OrganizationName element.- Since:
- 0.10.0
-
ORGANIZATIONDISPLAYNAME_NAME
QName of the OrganizationDisplayName element.- Since:
- 0.10.0
-
ORGANIZATIONURL_NAME
QName of the OrganizationURL element.- Since:
- 0.10.0
-
-
Constructor Details
-
SAMLMetadataSupport
private SAMLMetadataSupport()Constructor.
-
-
Method Details
-
isEntityOrEntitiesDescriptor
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
Checks if the given element is an EntitiesDescriptor.- Parameters:
e- element to check- Returns:
- true if the element is an EntitiesDescriptor, false otherwise
-
isEntityDescriptor
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, nevernullextensionName- name of the extension element, nevernull- 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, nevernullextensionName- the name of the extension element, nevernull- Returns:
- the first instance of the extension element or
nullif no such element exists as an extension of the descriptor - Since:
- 0.10.0
-
getEntityID
Return theentityIDattribute from an entity descriptor, ornullif it doesn't have one.- Parameters:
entity-Elementfrom which to extract theentityID- Returns:
- the
entityID, ornull
-