necouchman commented on code in PR #677:
URL: https://github.com/apache/guacamole-client/pull/677#discussion_r1169342851
##########
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/AbstractGuacamoleTunnelService.java:
##########
@@ -416,6 +462,21 @@ private GuacamoleTunnel
assignGuacamoleTunnel(ActiveConnectionRecord activeConne
GuacamoleClientInformation info, Map<String, String> tokens,
boolean interceptErrors) throws GuacamoleException {
+ // Set up JDBC-specific tokens
+ tokens.put(JDBC_DATE_TOKEN,
+ new SimpleDateFormat(JDBC_DATE_TOKEN_FORMAT)
+ .format(activeConnection.getStartDate()));
+ tokens.put(JDBC_TIME_TOKEN,
+ new SimpleDateFormat(JDBC_TIME_TOKEN_FORMAT)
+ .format(activeConnection.getStartDate()));
+ tokens.put(JDBC_CONNECTION_NAME_TOKEN,
activeConnection.getConnectionName());
+ tokens.put(JDBC_CONNECTION_ID_TOKEN,
activeConnection.getConnectionIdentifier());
Review Comment:
Yeah, I'm fine implementing these at a higher level. I think I originally
looked at it, but seemed like there were some challenges with grabbing those
items for connections not stored in JDBC. I'll take another look, though.
For a balancing group, it's a good point. Seems like there are two possible
options - or perhaps we should do some combination of both of these:
* Use the value of the balancing group name & id.
* Use the value of the connection that is actually selected.
Seems like having both available might be useful - there may be
circumstances where it'd be useful - for example, when generating recording
names - to have the name of both the balancing group and the underlying
connection.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]