diff --git a/guacamole/src/main/webapp/app/auth/service/authenticationService.js b/guacamole/src/main/webapp/app/auth/service/authenticationService.js
index 2c0bd6bc0..cece87b17 100644
--- a/guacamole/src/main/webapp/app/auth/service/authenticationService.js
+++ b/guacamole/src/main/webapp/app/auth/service/authenticationService.js
@@ -36,7 +36,8 @@
* Failed logins may also result in guacInsufficientCredentials or
* guacInvalidCredentials events, if the provided credentials were rejected for
* being insufficient or invalid respectively. Both events will be provided
- * the set of parameters originally given to authenticate() and the set of
+ * the set of parameters originally given to authenticate() and the error that
+ * rejected the credentials. The Error object provided will contain set of
* expected credentials returned by the REST endpoint. This set of credentials
* will be in the form of a Field array.
*/
@@ -154,11 +155,11 @@ angular.module('auth').factory('authenticationService', ['$injector',
// Request credentials if provided credentials were invalid
if (error.type === Error.Type.INVALID_CREDENTIALS)
- $rootScope.$broadcast('guacInvalidCredentials', parameters, error.expected);
+ $rootScope.$broadcast('guacInvalidCredentials', parameters, error);
// Request more credentials if provided credentials were not enough
else if (error.type === Error.Type.INSUFFICIENT_CREDENTIALS)
- $rootScope.$broadcast('guacInsufficientCredentials', parameters, error.expected);
+ $rootScope.$broadcast('guacInsufficientCredentials', parameters, error);
authenticationProcess.reject(error);
});
diff --git a/guacamole/src/main/webapp/app/index/controllers/indexController.js b/guacamole/src/main/webapp/app/index/controllers/indexController.js
index 283e4a0cf..3980568d1 100644
--- a/guacamole/src/main/webapp/app/index/controllers/indexController.js
+++ b/guacamole/src/main/webapp/app/index/controllers/indexController.js
@@ -36,6 +36,14 @@ angular.module('index').controller('indexController', ['$scope', '$injector',
*/
$scope.guacNotification = guacNotification;
+ /**
+ * The message to display to the user as instructions for the login
+ * process.
+ *
+ * @type String
+ */
+ $scope.loginHelpText = null;
+
/**
* The credentials that the authentication service is has already accepted,
* pending additional credentials, if any. If the user is logged in, or no
@@ -120,23 +128,26 @@ angular.module('index').controller('indexController', ['$scope', '$injector',
};
// Display login screen if a whole new set of credentials is needed
- $scope.$on('guacInvalidCredentials', function loginInvalid(event, parameters, expected) {
+ $scope.$on('guacInvalidCredentials', function loginInvalid(event, parameters, error) {
$scope.page.title = 'APP.NAME';
$scope.page.bodyClassName = '';
+ $scope.loginHelpText = null;
$scope.acceptedCredentials = {};
- $scope.expectedCredentials = expected;
+ $scope.expectedCredentials = error.expected;
});
// Prompt for remaining credentials if provided credentials were not enough
- $scope.$on('guacInsufficientCredentials', function loginInsufficient(event, parameters, expected) {
+ $scope.$on('guacInsufficientCredentials', function loginInsufficient(event, parameters, error) {
$scope.page.title = 'APP.NAME';
$scope.page.bodyClassName = '';
+ $scope.loginHelpText = error.message;
$scope.acceptedCredentials = parameters;
- $scope.expectedCredentials = expected;
+ $scope.expectedCredentials = error.expected;
});
// Clear login screen if login was successful
$scope.$on('guacLogin', function loginSuccessful() {
+ $scope.loginHelpText = null;
$scope.acceptedCredentials = null;
$scope.expectedCredentials = null;
});
diff --git a/guacamole/src/main/webapp/app/login/directives/login.js b/guacamole/src/main/webapp/app/login/directives/login.js
index c818671a8..4941396c9 100644
--- a/guacamole/src/main/webapp/app/login/directives/login.js
+++ b/guacamole/src/main/webapp/app/login/directives/login.js
@@ -35,6 +35,14 @@ angular.module('login').directive('guacLogin', [function guacLogin() {
// Login directive scope
directive.scope = {
+ /**
+ * An optional instructional message to display within the login
+ * dialog.
+ *
+ * @type String
+ */
+ helpText : '=',
+
/**
* The login form or set of fields. This will be displayed to the user
* to capture their credentials.
diff --git a/guacamole/src/main/webapp/app/login/styles/dialog.css b/guacamole/src/main/webapp/app/login/styles/dialog.css
index c2d3a9709..56886c2bc 100644
--- a/guacamole/src/main/webapp/app/login/styles/dialog.css
+++ b/guacamole/src/main/webapp/app/login/styles/dialog.css
@@ -86,3 +86,15 @@
max-width: 3em;
margin: 0.5em auto;
}
+
+.login-ui.continuation div.login-dialog {
+ border-right: none;
+ border-left: none;
+ box-shadow: none;
+ max-width: 6in;
+}
+
+.login-ui.continuation .login-dialog .logo,
+.login-ui.continuation .login-dialog .version {
+ display: none;
+}
diff --git a/guacamole/src/main/webapp/app/login/styles/input.css b/guacamole/src/main/webapp/app/login/styles/input.css
index d56ae5b12..fd4d70527 100644
--- a/guacamole/src/main/webapp/app/login/styles/input.css
+++ b/guacamole/src/main/webapp/app/login/styles/input.css
@@ -38,4 +38,13 @@
.login-ui .login-dialog .buttons input[type="submit"] {
width: 100%;
margin: 0;
-}
\ No newline at end of file
+}
+
+.login-ui.continuation .login-dialog .buttons input[type="submit"] {
+ width: auto;
+}
+
+.login-ui.initial .login-dialog input.continue-login,
+.login-ui.continuation .login-dialog input.login {
+ display: none;
+}
diff --git a/guacamole/src/main/webapp/app/login/templates/login.html b/guacamole/src/main/webapp/app/login/templates/login.html
index d00f4a174..db30bf046 100644
--- a/guacamole/src/main/webapp/app/login/templates/login.html
+++ b/guacamole/src/main/webapp/app/login/templates/login.html
@@ -34,6 +34,9 @@
{{helpText | translate}}
+