Class RealmNestedPrincipal
java.lang.Object
org.wildfly.security.auth.principal.RealmNestedPrincipal
- All Implemented Interfaces:
Serializable,Principal
A principal type which is used to find a specific identity in a specific realm. This principal can be used to locate
an exact identity whose name may have changed or may be unknown, but which can be located another way (for example,
by primary key).
- Author:
- David M. Lloyd
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRealmNestedPrincipal(String realmName, Principal nestedPrincipal) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermine whether this principal is equal to the given object.booleanDetermine whether this principal is equal to the given object.getName()Returns the name of this principal, which is composed of the realm name and the name of the nested principal.Get the nested principal.<P extends Principal>
PgetNestedPrincipal(Class<P> principalClass) Get the nested principal if it is of the given type class.Get the realm name.inthashCode()Get the hash code of this principal.toString()Get this principal as a string.
-
Constructor Details
-
RealmNestedPrincipal
Construct a new instance.- Parameters:
realmName- the realm name (must not benull)nestedPrincipal- the nested principal (must not benull)
-
-
Method Details
-
getRealmName
Get the realm name.- Returns:
- the realm name (not
null)
-
getNestedPrincipal
Get the nested principal.- Returns:
- the nested principal (not
null)
-
getNestedPrincipal
Get the nested principal if it is of the given type class.- Returns:
- the nested principal, or
nullif the nested principal is not of the given type
-
getName
Returns the name of this principal, which is composed of the realm name and the name of the nested principal. -
hashCode
public int hashCode()Get the hash code of this principal. -
equals
Determine whether this principal is equal to the given object. -
equals
Determine whether this principal is equal to the given object.- Parameters:
obj- the object- Returns:
trueif they are equal,falseotherwise
-
toString
Get this principal as a string.
-