Class SwedishEidDiscoveryMatchingRules

java.lang.Object
se.swedenconnect.opensaml.sweid.saml2.discovery.SwedishEidDiscoveryMatchingRules

public class SwedishEidDiscoveryMatchingRules extends Object
A class that implements the Discovery matching rules described in section 1.3 and 1.4 in Entity Categories for the Swedish eID Framework.
Author:
Martin Lindström (martin@idsec.se)
  • Constructor Details

    • SwedishEidDiscoveryMatchingRules

      public SwedishEidDiscoveryMatchingRules()
  • Method Details

    • isMatch

      public static boolean isMatch(Collection<String> consumingService, Collection<String> providingService)
      Determines if there if the consuming service (SP) may use the providing service (IdP) based on the entity categories that they have declared.

      The algorithm is defined in section 1.4 of Entity Categories for the Swedish eID Framework. The discovery process SHOULD display Identity Providers as a plausible choice, if and only if, the following conditions apply;

      Parameters:
      consumingService - the entity categories declared by the consuming service (SP)
      providingService - the entity categories declared by the providing service (IdP)
      Returns:
      true if the above algorithm evaluates to true and false otherwise
      See Also:
    • isServiceEntityMatch

      public static boolean isServiceEntityMatch(Collection<String> consumingService, Collection<String> providingService)
      Determines if there is a match regarding service entity categories declared by a consuming service and a providing service. This is the first condition (out of three) of the algorithm defined in section 1.4 of Entity Categories for the Swedish eID Framework.
      Parameters:
      consumingService - the entity categories declared by the consuming service (SP)
      providingService - the entity categories declared by the providing service (IdP)
      Returns:
      true if the providing service declares at least one of the service entity categories declared by the consuming service and false otherwise
    • isServiceContractMatch

      public static boolean isServiceContractMatch(Collection<String> consumingService, Collection<String> providingService)
      Determines if there is a match regarding service contract categories declared by a consuming service and a providing service. This is the second condition (out of threee) of the algorithm defined in section 1.4 of Entity Categories for the Swedish eID Framework.
      Parameters:
      consumingService - the entity categories declared by the consuming service (SP)
      providingService - the entity categories declared by the providing service (IdP)
      Returns:
      if the providing service declares at least one service contract category and the consuming service declares at least one of those declared identifiers true is returned
    • isServicePropertyMatch

      public static boolean isServicePropertyMatch(Collection<String> consumingService, Collection<String> providingService)
      Determines if there is a match regarding service property categories declared by a consuming service and a providing service. This is the third condition (out of threee) of the algorithm defined in section 1.4 of Entity Categories for the Swedish eID Framework.
      Parameters:
      consumingService - the entity categories declared by the consuming service (SP)
      providingService - the entity categories declared by the providing service (IdP)
      Returns:
      if all of the Service Property identifiers declared by the consuming service is declared by the providing service true is returned