GUACAMOLE-1298: Migrate to centralized declarations of common dependencies.

This commit is contained in:
Michael Jumper
2021-03-25 19:58:53 -07:00
parent d4e3d8c98f
commit 53fe6e34f8
35 changed files with 306 additions and 127 deletions

View File

@@ -30,6 +30,13 @@
<name>guacamole-auth-totp</name>
<url>http://guacamole.incubator.apache.org/</url>
<parent>
<groupId>org.apache.guacamole</groupId>
<artifactId>guacamole-client</artifactId>
<version>1.3.0</version>
<relativePath>../../</relativePath>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
@@ -225,19 +232,16 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>27.0.1-jre</version>
</dependency>
<!-- Guice -->
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>com.google.inject.extensions</groupId>
<artifactId>guice-multibindings</artifactId>
<version>3.0</version>
</dependency>
<!-- Java servlet API -->

View File

@@ -35,7 +35,6 @@ import org.apache.guacamole.auth.totp.user.UserTOTPKey;
import org.apache.guacamole.auth.totp.conf.ConfigurationService;
import org.apache.guacamole.form.Field;
import org.apache.guacamole.totp.TOTPGenerator;
import org.codehaus.jackson.annotate.JsonProperty;
/**
* Field which prompts the user for an authentication code generated via TOTP.
@@ -242,8 +241,7 @@ public class AuthenticationCodeField extends Field {
* If the configuration information required for generating the key URI
* cannot be read from guacamole.properties.
*/
@JsonProperty("keyUri")
public URI getKeyURI() throws GuacamoleException {
public URI getKeyUri() throws GuacamoleException {
// Do not generate a key URI if no key is being exposed
if (key == null)
@@ -276,11 +274,10 @@ public class AuthenticationCodeField extends Field {
* If the configuration information required for generating the QR code
* cannot be read from guacamole.properties.
*/
@JsonProperty("qrCode")
public String getQRCode() throws GuacamoleException {
public String getQrCode() throws GuacamoleException {
// Do not generate a QR code if no key is being exposed
URI keyURI = getKeyURI();
URI keyURI = getKeyUri();
if (keyURI == null)
return null;