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.
  • 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

      public 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 provided Environment, as returned by Environment.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 of LocalEnvironment, as returned by Environment.getCaseSensitivity().
  • Method Details

    • getEffectiveUserGroups

      public Set<String> 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 interface AuthenticatedUser
      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 interface AuthenticatedUser