diff options
author | Udo Walter | 2020-08-08 02:16:14 +0200 |
---|---|---|
committer | Udo Walter | 2020-08-08 02:16:14 +0200 |
commit | 6f00e70ecc3a707954e8888810bca34d114758bc (patch) | |
tree | 3a3f0b4a951544357d4a86d6aed84948261d81cb /src/main/java/de/bwlehrpool | |
parent | Reduce SPAM by using .debug() not .info() (diff) | |
download | bwlp-guacamole-ext-6f00e70ecc3a707954e8888810bca34d114758bc.tar.gz bwlp-guacamole-ext-6f00e70ecc3a707954e8888810bca34d114758bc.tar.xz bwlp-guacamole-ext-6f00e70ecc3a707954e8888810bca34d114758bc.zip |
Some UI changes:
- add double click to select location and continue
- add a preselected location (first one in the list without a password)
- add logo above the location selection
- remove redundant text at the bottom
- the logo is now customizable via the guacamole.properties file (property name: slx-logo-url)
Diffstat (limited to 'src/main/java/de/bwlehrpool')
3 files changed, 34 insertions, 1 deletions
diff --git a/src/main/java/de/bwlehrpool/bwlp_guac/BwlpAuthenticationProvider.java b/src/main/java/de/bwlehrpool/bwlp_guac/BwlpAuthenticationProvider.java index c737c4f..f73de84 100644 --- a/src/main/java/de/bwlehrpool/bwlp_guac/BwlpAuthenticationProvider.java +++ b/src/main/java/de/bwlehrpool/bwlp_guac/BwlpAuthenticationProvider.java @@ -24,7 +24,7 @@ public class BwlpAuthenticationProvider implements AuthenticationProvider { } public Object getResource() throws GuacamoleException { - return null; + return new BwlpREST(); } public AuthenticatedUser authenticateUser(Credentials credentials) throws GuacamoleException { diff --git a/src/main/java/de/bwlehrpool/bwlp_guac/BwlpREST.java b/src/main/java/de/bwlehrpool/bwlp_guac/BwlpREST.java new file mode 100644 index 0000000..65258f7 --- /dev/null +++ b/src/main/java/de/bwlehrpool/bwlp_guac/BwlpREST.java @@ -0,0 +1,17 @@ +package de.bwlehrpool.bwlp_guac; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; + +public class BwlpREST { + + @GET + @Path("logoUrl") + @Produces(MediaType.TEXT_PLAIN) + public String getLogoUrl() { + return SlxConfig.logoUrl(); + } + +}
\ No newline at end of file diff --git a/src/main/java/de/bwlehrpool/bwlp_guac/SlxConfig.java b/src/main/java/de/bwlehrpool/bwlp_guac/SlxConfig.java index 48c707f..f93c965 100644 --- a/src/main/java/de/bwlehrpool/bwlp_guac/SlxConfig.java +++ b/src/main/java/de/bwlehrpool/bwlp_guac/SlxConfig.java @@ -20,6 +20,13 @@ public class SlxConfig { } }; + private static final StringGuacamoleProperty LOGO_URL = new StringGuacamoleProperty() { + @Override + public String getName() { + return "slx-logo-url"; + } + }; + static { Environment e; try { @@ -40,4 +47,13 @@ public class SlxConfig { } } + public static String logoUrl() { + try { + return ENVIRONMENT.getProperty(LOGO_URL); + } catch (GuacamoleException e) { + LOGGER.warn("Cannot get logo url from properties", e); + return null; + } + } + } |