Class Saml2ServiceProviderUiInfo

java.lang.Object
se.swedenconnect.spring.saml.idp.authentication.Saml2ServiceProviderUiInfo
All Implemented Interfaces:
Serializable

public class Saml2ServiceProviderUiInfo extends Object implements 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:
  • Field Details

    • NO_LANG

      public static final String 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

      public String getEntityId()
      Gets the entityID for the SP.
      Returns:
      the SP entityID
    • getDisplayNames

      public Map<String,String> 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

      public String getDisplayName(String languageTag)
      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

      public Map<String,String> 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

      public String getDescription(String languageTag)
      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

      public List<Saml2ServiceProviderUiInfo.Logotype> getLogotypes()
      Gets the logotypes.
      Returns:
      a list of logotypes
    • getLogotype

      Returns the first logotype for which the supplied Predicate evaluates to true.
      Parameters:
      predicate - the predicate for testing the possible logotypes
      Returns:
      a matching logotype, or else null