Class Saml2ServiceProviderUiInfo
java.lang.Object
se.swedenconnect.spring.saml.idp.authentication.Saml2ServiceProviderUiInfo
- All Implemented Interfaces:
Serializable
A utility class that holds information about a SAML Service Provider that the IdP may want to use in its UI.
Regarding the display names: The class first looks for display names under the mdui:UIInfo
metadata
extension, then under Organization/OrganizationDisplayNames
and finally under
Organization/OrganizationNames
.
- Author:
- Martin Lindström
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Representation of a logotype. -
Field Summary
-
Constructor Summary
ConstructorDescriptionSaml2ServiceProviderUiInfo
(org.opensaml.saml.saml2.metadata.EntityDescriptor metadata) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetDescription
(String languageTag) Gets the description for the given language.Gets a map of the descriptions, where the map key is the language tag and the value is the description.getDisplayName
(String languageTag) Gets the display name for the given language.Gets a map of the display names, where the map key is the language tag and the value is the display name.Gets the entityID for the SP.getLogotype
(Predicate<Saml2ServiceProviderUiInfo.Logotype> predicate) Returns the first logotype for which the suppliedPredicate
evaluates totrue
.Gets the logotypes.
-
Field Details
-
NO_LANG
Constant used if no language tag has been set in SP metadata.- See Also:
-
-
Constructor Details
-
Saml2ServiceProviderUiInfo
public Saml2ServiceProviderUiInfo(org.opensaml.saml.saml2.metadata.EntityDescriptor metadata) Constructor.- Parameters:
metadata
- the SAML metadata for the SP
-
-
Method Details
-
getEntityId
Gets the entityID for the SP.- Returns:
- the SP entityID
-
getDisplayNames
Gets a map of the display names, where the map key is the language tag and the value is the display name.- Returns:
- the display names
-
getDisplayName
Gets the display name for the given language. If no mapping exists for the language and there is a display name with no language tag available, this is returned.- Parameters:
languageTag
- the language tag- Returns:
- the display name or
null
-
getDescriptions
Gets a map of the descriptions, where the map key is the language tag and the value is the description.- Returns:
- the descriptions
-
getDescription
Gets the description for the given language. If no mapping exists for the language and there is a description with no language tag available, this is returned.- Parameters:
languageTag
- the language tag- Returns:
- the description or
null
-
getLogotypes
Gets the logotypes.- Returns:
- a list of logotypes
-
getLogotype
public Saml2ServiceProviderUiInfo.Logotype getLogotype(Predicate<Saml2ServiceProviderUiInfo.Logotype> predicate) Returns the first logotype for which the suppliedPredicate
evaluates totrue
.- Parameters:
predicate
- the predicate for testing the possible logotypes- Returns:
- a matching logotype, or else
null
-