Class SAML2ObjectSupport


  • public final class SAML2ObjectSupport
    extends Object
    A helper class for working with SAMLObjects.
    • Constructor Detail

      • SAML2ObjectSupport

        private SAML2ObjectSupport()
        Constructor.
    • Method Detail

      • areNameIDFormatsEquivalent

        public static boolean areNameIDFormatsEquivalent​(@Nullable
                                                         String format1,
                                                         @Nullable
                                                         String format2)
        Return true iff the two input NameID formats are equivalent for SAML 2.0 purposes.
        Parameters:
        format1 - first format to check
        format2 - second format to check
        Returns:
        true iff the two format values should be viewed as equivalent
      • areNameIDsEquivalent

        public static boolean areNameIDsEquivalent​(@Nonnull
                                                   NameID name1,
                                                   @Nonnull
                                                   NameID name2)
        Return true iff the two input NameID objects are equivalent for SAML 2.0 purposes, with the assumption that the qualifier attributes must match exactly.
        Parameters:
        name1 - first NameID to check
        name2 - second NameID to check
        Returns:
        true iff the two values should be viewed as equivalent
      • areNameIDsEquivalent

        public static boolean areNameIDsEquivalent​(@Nonnull
                                                   NameID name1,
                                                   @Nonnull
                                                   NameID name2,
                                                   @Nullable
                                                   String assertingParty,
                                                   @Nullable
                                                   String relyingParty)
        Return true iff the two input NameID objects are equivalent for SAML 2.0 purposes, allowing thw qualifier attributes to assume default values if not otherwise set.
        Parameters:
        name1 - first NameID to check
        name2 - second NameID to check
        assertingParty - optional name of asserting party to default in as NameQualifier
        relyingParty - optional name of relying party to default in as SPNameQualifier
        Returns:
        true iff the two values should be viewed as equivalent
        Since:
        3.4.0