java.lang.Object
org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityRef
Direct Known Subclasses:
ExternalGroupRef

public class ExternalIdentityRef extends Object
ExternalIdentityRef defines a reference to an external identity.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ExternalIdentityRef(@NotNull String id, @Nullable String providerName)
    Creates a new external identity ref with the given id and provider name
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Tests if the given object is an external identity reference and if it's getString() is equal to this.
    static @NotNull ExternalIdentityRef
    fromString(@NotNull String str)
    Creates an external identity reference from a string representation.
    @NotNull String
    Returns the id of the external identity.
    @Nullable String
    Returns the name of the identity provider.
    @NotNull String
    Returns a string representation of this external identity reference
    int
     
     

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ExternalIdentityRef

      public ExternalIdentityRef(@NotNull @NotNull String id, @Nullable @Nullable String providerName)
      Creates a new external identity ref with the given id and provider name
      Parameters:
      id - the id of the identity.
      providerName - the name of the identity provider
  • Method Details

    • getProviderName

      @Nullable public @Nullable String getProviderName()
      Returns the name of the identity provider.
      Returns:
      the name of the identity provider.
    • getId

      @NotNull public @NotNull String getId()
      Returns the id of the external identity. for example the DN of an LDAP user.
      Returns:
      the id
    • getString

      @NotNull public @NotNull String getString()
      Returns a string representation of this external identity reference
      Returns:
      a string representation.
    • fromString

      @NotNull public static @NotNull ExternalIdentityRef fromString(@NotNull @NotNull String str)
      Creates an external identity reference from a string representation.
      Parameters:
      str - the string
      Returns:
      the reference
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Tests if the given object is an external identity reference and if it's getString() is equal to this. Note, that there is no need to include id and provider fields in the comparison as the string representation already incorporates both.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      Returns:
      same as this.getString().hashCode()