From 51d3fd20302d7f94cfb4552f4c7f41761b6650f5 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Thu, 14 May 2015 23:51:02 +0000 Subject: [PATCH] GUAC-587: Failed providers should throw "invalid" credential exceptions, not "insufficient". --- .../net/basic/extension/AuthenticationProviderFacade.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/extension/AuthenticationProviderFacade.java b/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/extension/AuthenticationProviderFacade.java index 4316fe1c0..b5dd36d4a 100644 --- a/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/extension/AuthenticationProviderFacade.java +++ b/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/extension/AuthenticationProviderFacade.java @@ -28,7 +28,7 @@ import org.glyptodon.guacamole.net.auth.AuthenticationProvider; import org.glyptodon.guacamole.net.auth.Credentials; import org.glyptodon.guacamole.net.auth.UserContext; import org.glyptodon.guacamole.net.auth.credentials.CredentialsInfo; -import org.glyptodon.guacamole.net.auth.credentials.GuacamoleInsufficientCredentialsException; +import org.glyptodon.guacamole.net.auth.credentials.GuacamoleInvalidCredentialsException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -124,7 +124,7 @@ public class AuthenticationProviderFacade implements AuthenticationProvider { // Ignore auth attempts if no auth provider could be loaded if (authProvider == null) { logger.warn("Authentication attempt denied because the authentication system could not be loaded. Please for errors earlier in the logs."); - throw new GuacamoleInsufficientCredentialsException("Permission denied.", CredentialsInfo.USERNAME_PASSWORD); + throw new GuacamoleInvalidCredentialsException("Permission denied.", CredentialsInfo.USERNAME_PASSWORD); } // Delegate to underlying auth provider @@ -139,7 +139,7 @@ public class AuthenticationProviderFacade implements AuthenticationProvider { // Ignore auth attempts if no auth provider could be loaded if (authProvider == null) { logger.warn("Reauthentication attempt denied because the authentication system could not be loaded. Please for errors earlier in the logs."); - throw new GuacamoleInsufficientCredentialsException("Permission denied.", CredentialsInfo.USERNAME_PASSWORD); + throw new GuacamoleInvalidCredentialsException("Permission denied.", CredentialsInfo.USERNAME_PASSWORD); } // Delegate to underlying auth provider