public class SimpleUserContext extends AbstractUserContext
DEFAULT_ROOT_CONNECTION_GROUP
Constructor and Description |
---|
SimpleUserContext(AuthenticationProvider authProvider,
Map<String,org.apache.guacamole.protocol.GuacamoleConfiguration> configs)
Creates a new SimpleUserContext which provides access to only those
configurations within the given Map.
|
SimpleUserContext(AuthenticationProvider authProvider,
String username,
Map<String,org.apache.guacamole.protocol.GuacamoleConfiguration> configs)
Creates a new SimpleUserContext for the user with the given username
which provides access to only those configurations within the given Map.
|
Modifier and Type | Method and Description |
---|---|
AuthenticationProvider |
getAuthenticationProvider()
Returns the AuthenticationProvider which created this UserContext, which
may not be the same AuthenticationProvider that authenticated the user
associated with this UserContext.
|
Directory<Connection> |
getConnectionDirectory()
Retrieves a Directory which can be used to view and manipulate
connections and their configurations, but only as allowed by the
permissions given to the user.
|
Object |
getResource()
Returns an arbitrary REST resource representing this UserContext.
|
User |
self()
Returns the User whose access rights control the operations of this
UserContext.
|
getActiveConnectionDirectory, getConnectionAttributes, getConnectionGroupAttributes, getConnectionGroupDirectory, getConnectionHistory, getRootConnectionGroup, getSharingProfileAttributes, getSharingProfileDirectory, getUserAttributes, getUserDirectory, getUserGroupAttributes, getUserGroupDirectory, getUserHistory, invalidate
public SimpleUserContext(AuthenticationProvider authProvider, Map<String,org.apache.guacamole.protocol.GuacamoleConfiguration> configs)
authProvider
- The AuthenticationProvider creating this UserContext.configs
- A Map of all configurations for which the user associated with this
UserContext has read access.public SimpleUserContext(AuthenticationProvider authProvider, String username, Map<String,org.apache.guacamole.protocol.GuacamoleConfiguration> configs)
authProvider
- The AuthenticationProvider creating this UserContext.username
- The username of the user associated with this UserContext.configs
- A Map of all configurations for which the user associated with
this UserContext has read access.public User self()
UserContext
public Object getResource() throws org.apache.guacamole.GuacamoleException
AbstractUserContext
This implementation simply returns null
. Implementations that
wish to expose REST resources specific to a user's session should
override this function.
getResource
in interface UserContext
getResource
in class AbstractUserContext
org.apache.guacamole.GuacamoleException
- If the REST resource cannot be returned due to an error.public AuthenticationProvider getAuthenticationProvider()
UserContext
public Directory<Connection> getConnectionDirectory() throws org.apache.guacamole.GuacamoleException
AbstractUserContext
This implementation simply returns an empty Directory
.
Implementations that wish to expose connections should override this
function.
getConnectionDirectory
in interface UserContext
getConnectionDirectory
in class AbstractUserContext
org.apache.guacamole.GuacamoleException
- If an error occurs while creating the
Directory.Copyright © 2018. All rights reserved.