public class MetadataUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Optional<EntityAttributes> |
getEntityAttributes(EntityDescriptor ed)
Returns the
EntityAttributes element that is placed as an extension to the supplied entity descriptor. |
static List<X509Credential> |
getMetadataCertificates(EntityDescriptor ed,
UsageType usageType)
Utility that extracs certificates found under the KeyDescriptor elements of a metadata record.
|
static <T> Optional<T> |
getMetadataExtension(Extensions extensions,
Class<T> clazz)
Finds the first extension matching the supplied type.
|
static <T> List<T> |
getMetadataExtensions(Extensions extensions,
Class<T> clazz)
Finds all extensions matching the supplied type.
|
static Optional<String> |
getUiDescription(EntityDescriptor ed,
String language)
Utility method that returns the
mdui:Description element for the given language tag from the SSO descriptor
extension of the supplied entity descriptor. |
static List<Description> |
getUiDescriptions(EntityDescriptor ed)
Utility method that returns a list of the
mdui:Description element found in the SSO descriptor extension of
the supplied entity descriptor. |
static Optional<String> |
getUiDisplayName(EntityDescriptor ed,
String language)
Utility method that returns the
mdui:DisplayName element for the given language tag from the SSO descriptor
extension of the supplied entity descriptor. |
static List<DisplayName> |
getUiDisplayNames(EntityDescriptor ed)
Utility method that returns a list of the
mdui:DisplayName element found in the SSO descriptor extension of
the supplied entity descriptor. |
public static <T> Optional<T> getMetadataExtension(Extensions extensions, Class<T> clazz)
T
- the type of the extensionextensions
- the Extensions
to searchclazz
- the extension typepublic static <T> List<T> getMetadataExtensions(Extensions extensions, Class<T> clazz)
T
- the type of the extensionextensions
- the Extensions
to searchclazz
- the extension typepublic static Optional<EntityAttributes> getEntityAttributes(EntityDescriptor ed)
EntityAttributes
element that is placed as an extension to the supplied entity descriptor.ed
- the entity descriptorpublic static List<DisplayName> getUiDisplayNames(EntityDescriptor ed)
mdui:DisplayName
element found in the SSO descriptor extension of
the supplied entity descriptor.ed
- the entity descriptorDisplayName
elementspublic static Optional<String> getUiDisplayName(EntityDescriptor ed, String language)
mdui:DisplayName
element for the given language tag from the SSO descriptor
extension of the supplied entity descriptor.ed
- the entity descriptorlanguage
- the language tagpublic static List<Description> getUiDescriptions(EntityDescriptor ed)
mdui:Description
element found in the SSO descriptor extension of
the supplied entity descriptor.ed
- the entity descriptorDescription
elementspublic static Optional<String> getUiDescription(EntityDescriptor ed, String language)
mdui:Description
element for the given language tag from the SSO descriptor
extension of the supplied entity descriptor.ed
- the entity descriptorlanguage
- the language tagpublic static List<X509Credential> getMetadataCertificates(EntityDescriptor ed, UsageType usageType)
If UsageType.SIGNING
is supplied, the method will return all certificates with usage type signing, but also
those that does not have a usage. And the same goes for encryption.
ed
- the metadata recordusageType
- the requested usage typeCopyright © 2018 Litsec AB. All rights reserved.