Class ExternalIdentityRef
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityRef
-
- Direct Known Subclasses:
ExternalGroupRef
public class ExternalIdentityRef extends java.lang.Object
ExternalIdentityRef
defines a reference to an external identity.
-
-
Constructor Summary
Constructors Constructor Description ExternalIdentityRef(@NotNull java.lang.String id, @Nullable java.lang.String providerName)
Creates a new external identity ref with the given id and provider name
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Tests if the given object is an external identity reference and if it's getString() is equal to this.static @NotNull ExternalIdentityRef
fromString(@NotNull java.lang.String str)
Creates an external identity reference from a string representation.@NotNull java.lang.String
getId()
Returns the id of the external identity.@Nullable java.lang.String
getProviderName()
Returns the name of the identity provider.@NotNull java.lang.String
getString()
Returns a string representation of this external identity referenceint
hashCode()
java.lang.String
toString()
-
-
-
Constructor Detail
-
ExternalIdentityRef
public ExternalIdentityRef(@NotNull @NotNull java.lang.String id, @Nullable @Nullable java.lang.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 Detail
-
getProviderName
@Nullable public @Nullable java.lang.String getProviderName()
Returns the name of the identity provider.- Returns:
- the name of the identity provider.
-
getId
@NotNull public @NotNull java.lang.String getId()
Returns the id of the external identity. for example the DN of an LDAP user.- Returns:
- the id
-
getString
@NotNull public @NotNull java.lang.String getString()
Returns a string representation of this external identity reference- Returns:
- a string representation.
-
fromString
@NotNull public static @NotNull ExternalIdentityRef fromString(@NotNull @NotNull java.lang.String str)
Creates an external identity reference from a string representation.- Parameters:
str
- the string- Returns:
- the reference
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.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 includeid
andprovider
fields in the comparison as the string representation already incorporates both.- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- same as
this.getString().hashCode()
-
-