- All Superinterfaces:
java.security.Principal
- All Known Implementing Classes:
DefaultAuthenticatedIdentity
public interface AuthenticatedIdentity
extends java.security.Principal
This interface is implemented by classes that represent the current authenticated identity.
What current means here is context dependent. In a Jakarta Servlet application this refers to the caller (user) details during a single HTTP request.
- Author:
- Arjan Tijms
-
Method Summary
Modifier and Type Method Description java.security.Principal
getCallerPrincipal()
Returns the caller principal, which represents the primary name of the calling entity (aka the "caller") to a server.java.util.Set<java.lang.String>
getGroups()
The groups the caller is in.default java.lang.String
getName()
-
Method Details
-
getName
default java.lang.String getName()- Specified by:
getName
in interfacejava.security.Principal
-
getCallerPrincipal
java.security.Principal getCallerPrincipal()Returns the caller principal, which represents the primary name of the calling entity (aka the "caller") to a server.- Returns:
- the caller principal, or null if authentication has not (yet) completed successfully.
-
getGroups
java.util.Set<java.lang.String> getGroups()The groups the caller is in.If group to role mapping is not active (the default) groups are equal to roles.
- Returns:
- the set of groups the caller is in, never null.
-