Package org.apache.guacamole.net.auth
Class AbstractAuthenticatedUser
java.lang.Object
org.apache.guacamole.net.auth.AbstractIdentifiable
org.apache.guacamole.net.auth.AbstractAuthenticatedUser
- All Implemented Interfaces:
AuthenticatedUser
,Identifiable
public abstract class AbstractAuthenticatedUser
extends AbstractIdentifiable
implements AuthenticatedUser
Basic implementation of an AuthenticatedUser which uses the username to
determine equality. Username comparison is case-sensitive.
-
Field Summary
Fields inherited from interface org.apache.guacamole.net.auth.AuthenticatedUser
ANONYMOUS_IDENTIFIER
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new AbstractAuthenticatedUser that considers usernames to be case-sensitive or case-insensitive based on the case sensitivity setting of an instance ofLocalEnvironment
, as returned byEnvironment.getCaseSensitivity()
.AbstractAuthenticatedUser
(boolean caseSensitive) Creates a new AbstractAuthenticatedUser that considers usernames to be case-sensitive or case-insensitive based on the provided case sensitivity flag.AbstractAuthenticatedUser
(Environment environment) Creates a new AbstractAuthenticatedUser that considers usernames to be case-sensitive or case-insensitive based on the case sensitivity setting of the providedEnvironment
, as returned byEnvironment.getCaseSensitivity()
. -
Method Summary
Modifier and TypeMethodDescriptionReturns a read-only set of the identifiers of all user groups which apply to this authenticated user.void
Invalidates this authenticated user and their associated token such that they are no longer logged in.Methods inherited from class org.apache.guacamole.net.auth.AbstractIdentifiable
equals, getIdentifier, hashCode, setIdentifier
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.guacamole.net.auth.AuthenticatedUser
getAuthenticationProvider, getCredentials
Methods inherited from interface org.apache.guacamole.net.auth.Identifiable
getIdentifier, setIdentifier
-
Constructor Details
-
AbstractAuthenticatedUser
public AbstractAuthenticatedUser(boolean caseSensitive) Creates a new AbstractAuthenticatedUser that considers usernames to be case-sensitive or case-insensitive based on the provided case sensitivity flag.- Parameters:
caseSensitive
- true if usernames should be considered case-sensitive, false otherwise.
-
AbstractAuthenticatedUser
Creates a new AbstractAuthenticatedUser that considers usernames to be case-sensitive or case-insensitive based on the case sensitivity setting of the providedEnvironment
, as returned byEnvironment.getCaseSensitivity()
.- Parameters:
environment
- The Environment that should determine whether this AbstractAuthenticatedUser considers usernames to be case-sensitive.
-
AbstractAuthenticatedUser
public AbstractAuthenticatedUser()Creates a new AbstractAuthenticatedUser that considers usernames to be case-sensitive or case-insensitive based on the case sensitivity setting of an instance ofLocalEnvironment
, as returned byEnvironment.getCaseSensitivity()
.
-
-
Method Details
-
getEffectiveUserGroups
Description copied from interface:AuthenticatedUser
Returns a read-only set of the identifiers of all user groups which apply to this authenticated user. The exact semantics of what user groups apply are up to the implementation, and the user groups within this set may be implied, derived dynamically, inherited through multiple levels of group membership, etc. Note that, as with user identifiers, user group identifiers form the basis of identity which applies across authentication providers. It is expected that any two user groups having the same identifier represent the same group, even if defined by different authentication providers.- Specified by:
getEffectiveUserGroups
in interfaceAuthenticatedUser
- Returns:
- A read-only set of the identifiers of all user groups which apply to this authenticated user.
-
invalidate
public void invalidate()Description copied from interface:AuthenticatedUser
Invalidates this authenticated user and their associated token such that they are no longer logged in. This function will be automatically invoked when the user logs out, or when their session expires.- Specified by:
invalidate
in interfaceAuthenticatedUser
-