diff options
Diffstat (limited to 'src/main/java/de/bwlehrpool/bwlp_guac/ConnectionManager.java')
-rw-r--r-- | src/main/java/de/bwlehrpool/bwlp_guac/ConnectionManager.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/main/java/de/bwlehrpool/bwlp_guac/ConnectionManager.java b/src/main/java/de/bwlehrpool/bwlp_guac/ConnectionManager.java index db8ff07..1f7d928 100644 --- a/src/main/java/de/bwlehrpool/bwlp_guac/ConnectionManager.java +++ b/src/main/java/de/bwlehrpool/bwlp_guac/ConnectionManager.java @@ -30,7 +30,8 @@ import javax.net.ssl.X509TrustManager; import org.apache.guacamole.form.Field; import org.apache.guacamole.net.auth.credentials.CredentialsInfo; import org.apache.guacamole.net.auth.credentials.GuacamoleCredentialsException; -import org.apache.guacamole.net.auth.credentials.GuacamoleInsufficientCredentialsException; +import org.apache.guacamole.language.TranslatableGuacamoleCredentialsException; +import org.apache.guacamole.language.TranslatableGuacamoleInsufficientCredentialsException; import org.codehaus.jackson.map.ObjectMapper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -135,8 +136,8 @@ public class ConnectionManager { JsonGroup group = groupPool.get(groupid); if (group == null) { // Request the user to select a group - throw new GuacamoleInsufficientCredentialsException( - "GROUP_SELECTION.TITLE", new CredentialsInfo( + throw new TranslatableGuacamoleInsufficientCredentialsException( + "GROUP_SELECTION.TITLE", "GROUP_SELECTION.TITLE", new CredentialsInfo( Collections.<Field>singletonList(new GroupField()) )); } @@ -164,8 +165,8 @@ public class ConnectionManager { } if (freeClient == null) { // Request the user to select another Group - throw new GuacamoleCredentialsException( - "GROUP_SELECTION.NO_FREE_ERROR", new CredentialsInfo( + throw new TranslatableGuacamoleCredentialsException( + "GROUP_SELECTION.NO_FREE_ERROR", "GROUP_SELECTION.NO_FREE_ERROR", new CredentialsInfo( Collections.<Field>singletonList(new GroupField()) )); } @@ -217,6 +218,8 @@ public class ConnectionManager { ((HttpsURLConnection) con).setHostnameVerifier(ignorer); ((HttpsURLConnection) con).setSSLSocketFactory(sockFac); } + con.setRequestProperty("Bwlp-Plugin-Build-Revision", BwlpAuthenticationProvider.MANIFEST.getProperty("Build-Revision")); + con.setRequestProperty("Bwlp-Plugin-Build-Timestamp", BwlpAuthenticationProvider.MANIFEST.getProperty("Build-Revision-Timestamp")); try (BufferedInputStream in = new BufferedInputStream(con.getInputStream())) { byte dataBuffer[] = new byte[2048]; int bytesRead; |