mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-990: Clear out any previous authentication token that is known to be invalid.
This commit is contained in:
@@ -198,12 +198,16 @@ angular.module('auth').factory('authenticationService', ['$injector',
|
|||||||
['catch'](requestService.createErrorCallback(function authenticationFailed(error) {
|
['catch'](requestService.createErrorCallback(function authenticationFailed(error) {
|
||||||
|
|
||||||
// Request credentials if provided credentials were invalid
|
// Request credentials if provided credentials were invalid
|
||||||
if (error.type === Error.Type.INVALID_CREDENTIALS)
|
if (error.type === Error.Type.INVALID_CREDENTIALS) {
|
||||||
$rootScope.$broadcast('guacInvalidCredentials', parameters, error);
|
$rootScope.$broadcast('guacInvalidCredentials', parameters, error);
|
||||||
|
clearAuthenticationResult();
|
||||||
|
}
|
||||||
|
|
||||||
// Request more credentials if provided credentials were not enough
|
// Request more credentials if provided credentials were not enough
|
||||||
else if (error.type === Error.Type.INSUFFICIENT_CREDENTIALS)
|
else if (error.type === Error.Type.INSUFFICIENT_CREDENTIALS) {
|
||||||
$rootScope.$broadcast('guacInsufficientCredentials', parameters, error);
|
$rootScope.$broadcast('guacInsufficientCredentials', parameters, error);
|
||||||
|
clearAuthenticationResult();
|
||||||
|
}
|
||||||
|
|
||||||
// Abort rendering of page if an internal error occurs
|
// Abort rendering of page if an internal error occurs
|
||||||
else if (error.type === Error.Type.INTERNAL_ERROR)
|
else if (error.type === Error.Type.INTERNAL_ERROR)
|
||||||
|
Reference in New Issue
Block a user