code: private GuacamoleConfiguration getGuacamoleConfiguration(RemoteAuthenticatedUser user,
              ModeledSharingProfile sharingProfile, String connectionID) {
  
          // Generate configuration from available data
          GuacamoleConfiguration config = new GuacamoleConfiguration();
          config.setConnectionID(connectionID);
  
          // Set parameters from associated data
          Collection<SharingProfileParameterModel> parameters = sharingProfileParameterMapper.select(sharingProfile.getIdentifier());
          for (SharingProfileParameterModel parameter : parameters)
              config.setParameter(parameter.getName(), parameter.getValue());
  
          return config;
  
      }
docs: Returns a guacamole configuration which joins the active connection
  having the given ID, using the provided sharing profile to restrict the
  access provided to the user accessing the shared connection. If tokens
  are used in the connection parameter values of the sharing profile,
  credentials from the given user will be substituted appropriately.
  
  @param user
  The user whose credentials should be used if necessary.
  
  @param sharingProfile
  The sharing profile whose associated parameters dictate the level
  of access granted to the user joining the connection.
  
  @param connectionID
  The ID of the connection being joined, as provided by guacd when the
  original connection was established, or null if a new connection
  should be created instead.
  
  @return
  A GuacamoleConfiguration containing the protocol and parameters from
  the given connection.