mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-10 07:01:21 +00:00
GUAC-1126: Automatically invalidate any existing token upon login.
This commit is contained in:
@@ -49,11 +49,11 @@ angular.module('login').controller('loginController', ['$scope', '$injector',
|
||||
*/
|
||||
$scope.login = function login() {
|
||||
|
||||
// Attempt login
|
||||
// Attempt login once existing session is destroyed
|
||||
authenticationService.login($scope.username, $scope.password)
|
||||
|
||||
// Redirect to main view upon success
|
||||
.success(function success(data, status, headers, config) {
|
||||
.then(function loginSuccessful() {
|
||||
|
||||
// Provide user with clean environment
|
||||
guacClientManager.clear();
|
||||
@@ -67,7 +67,7 @@ angular.module('login').controller('loginController', ['$scope', '$injector',
|
||||
})
|
||||
|
||||
// Reset and focus password upon failure
|
||||
.error(function error(data, status, headers, config) {
|
||||
['catch'](function loginFailed() {
|
||||
$scope.loginError = true;
|
||||
$scope.passwordFocused = true;
|
||||
$scope.password = '';
|
||||
|
Reference in New Issue
Block a user