mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
GUACAMOLE-611: Advise administrator to set "skip-if-unavailable" if similar internal errors should be tolerated in the future.
This commit is contained in:
@@ -154,6 +154,25 @@ public class AuthenticationProviderFacade implements AuthenticationProvider {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs a warning that the authentication process will be entirely aborted
|
||||||
|
* due to an internal error, advising the administrator to set the
|
||||||
|
* "skip-if-unavailable" property if error encountered is expected and
|
||||||
|
* should be tolerated.
|
||||||
|
*/
|
||||||
|
private void warnAuthAborted() {
|
||||||
|
String identifier = getIdentifier();
|
||||||
|
logger.warn("The \"{}\" authentication provider has encountered an "
|
||||||
|
+ "internal error which will halt the authentication "
|
||||||
|
+ "process. If this is unexpected or you are the developer of "
|
||||||
|
+ "this authentication provider, you may wish to enable "
|
||||||
|
+ "debug-level logging. If this is expected and you wish to "
|
||||||
|
+ "ignore such failures in the future, please set \"{}: {}\" "
|
||||||
|
+ "within your guacamole.properties.",
|
||||||
|
identifier, ExtensionModule.SKIP_IF_UNAVAILABLE.getName(),
|
||||||
|
identifier);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AuthenticatedUser authenticateUser(Credentials credentials)
|
public AuthenticatedUser authenticateUser(Credentials credentials)
|
||||||
throws GuacamoleException {
|
throws GuacamoleException {
|
||||||
@@ -186,6 +205,7 @@ public class AuthenticationProviderFacade implements AuthenticationProvider {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
warnAuthAborted();
|
||||||
throw e;
|
throw e;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -198,6 +218,7 @@ public class AuthenticationProviderFacade implements AuthenticationProvider {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
warnAuthAborted();
|
||||||
throw e;
|
throw e;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -251,6 +272,7 @@ public class AuthenticationProviderFacade implements AuthenticationProvider {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
warnAuthAborted();
|
||||||
throw e;
|
throw e;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -263,6 +285,7 @@ public class AuthenticationProviderFacade implements AuthenticationProvider {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
warnAuthAborted();
|
||||||
throw e;
|
throw e;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -93,7 +93,7 @@ public class ExtensionModule extends ServletModule {
|
|||||||
* providers that are not within this list will halt the authentication
|
* providers that are not within this list will halt the authentication
|
||||||
* process entirely.
|
* process entirely.
|
||||||
*/
|
*/
|
||||||
private final StringSetProperty SKIP_IF_UNAVAILABLE = new StringSetProperty() {
|
public static final StringSetProperty SKIP_IF_UNAVAILABLE = new StringSetProperty() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
|
Reference in New Issue
Block a user