Package org.apache.guacamole.net.auth
Interface User
-
- All Superinterfaces:
Attributes
,Identifiable
,Permissions
- All Known Implementing Classes:
AbstractUser
,DelegatingUser
,SimpleUser
public interface User extends Identifiable, Attributes, Permissions
A user of the Guacamole web application.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
User.Attribute
All standard attribute names with semantics defined by the Guacamole web application.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description Permissions
getEffectivePermissions()
Returns a read-only view of all permissions granted to this user.default List<? extends ActivityRecord>
getHistory()
Deprecated.This function is deprecated in favor ofgetUserHistory()
, which returns the login history as an ActivityRecordSet which supports various sort and filter functions.Date
getLastActive()
Returns the date and time that this user was last active.String
getPassword()
Returns this user's password.RelatedObjectSet
getUserGroups()
Returns a set of all readable user groups of which this user is a member.default ActivityRecordSet<ActivityRecord>
getUserHistory()
Returns an ActivityRecordSet containing ActivityRecords representing the login history for this user, including any active sessions.void
setPassword(String password)
Sets this user's password.-
Methods inherited from interface org.apache.guacamole.net.auth.Attributes
getAttributes, setAttributes
-
Methods inherited from interface org.apache.guacamole.net.auth.Identifiable
getIdentifier, setIdentifier
-
Methods inherited from interface org.apache.guacamole.net.auth.Permissions
getActiveConnectionPermissions, getConnectionGroupPermissions, getConnectionPermissions, getSharingProfilePermissions, getSystemPermissions, getUserGroupPermissions, getUserPermissions
-
-
-
-
Method Detail
-
getPassword
String getPassword()
Returns this user's password. Note that the password returned may be hashed or completely arbitrary.- Returns:
- A String which may (or may not) be the user's password.
-
setPassword
void setPassword(String password)
Sets this user's password. Note that while this function is guaranteed to change the password of this User object, there is no guarantee that getPassword() will return the value given to setPassword().- Parameters:
password
- The password to set.
-
getLastActive
Date getLastActive()
Returns the date and time that this user was last active. If the user was never active, the time that the user was last active is unknown, or this information is not visible to the current user, this may be null.- Returns:
- The date and time this user was last active, or null if this information is unavailable or inapplicable.
-
getHistory
@Deprecated default List<? extends ActivityRecord> getHistory() throws org.apache.guacamole.GuacamoleException
Deprecated.This function is deprecated in favor ofgetUserHistory()
, which returns the login history as an ActivityRecordSet which supports various sort and filter functions. While this continues to be defined for API compatibility, new implementation should avoid this function and use getUserHistory(), instead.Returns a list of ActivityRecords representing the login history of this user, including any active sessions. ActivityRecords in this list will be sorted in descending order of end time (active sessions are first), and then in descending order of start time (newer sessions are first). If user login history is not implemented this method should throw GuacamoleUnsupportedException.- Returns:
- A list of ActivityRecords representing the login history of this User.
- Throws:
org.apache.guacamole.GuacamoleException
- If history tracking is not implemented, if an error occurs while reading the history of this user, or if permission is denied.
-
getUserHistory
default ActivityRecordSet<ActivityRecord> getUserHistory() throws org.apache.guacamole.GuacamoleException
Returns an ActivityRecordSet containing ActivityRecords representing the login history for this user, including any active sessions. ActivityRecords in this list will be sorted in descending order of end time (active sessions are first), and then in descending order of start time (newer sessions are first). If login history tracking is not implemented, or is only implemented using the deprecatedgetHistory()
method, this method should throw GuacamoleUnsupportedException.- Returns:
- An ActivityRecordSet containing ActivityRecords representing the login history for this user.
- Throws:
org.apache.guacamole.GuacamoleException
- If history tracking is not implemented, if an error occurs while reading the history of this user, or if permission is denied.
-
getUserGroups
RelatedObjectSet getUserGroups() throws org.apache.guacamole.GuacamoleException
Returns a set of all readable user groups of which this user is a member. If permission is granted for the current user to modify the membership of this user, then the returned set will be mutable, and any such modifications should be made through changes to the returned set.- Returns:
- The set of all readable user groups of which this user is a member.
- Throws:
org.apache.guacamole.GuacamoleException
- If an error occurs while retrieving the user groups.
-
getEffectivePermissions
Permissions getEffectivePermissions() throws org.apache.guacamole.GuacamoleException
Returns a read-only view of all permissions granted to this user. The exact semantics of what permissions are granted are up to the implementation, and the permissions within this view may be implied, derived dynamically, inherited through multiple levels of group membership, etc.- Returns:
- A read-only view of the permissions which are granted to this user.
- Throws:
org.apache.guacamole.GuacamoleException
- If an error occurs while retrieving permissions, or if reading all permissions is not allowed.
-
-