You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by vn...@apache.org on 2018/04/30 12:00:41 UTC

[1/2] guacamole-client git commit: GUACAMOLE-526: Invoke logout() for the cached token BEFORE storing the new token. The logout() call erroneously invalidates the new token otherwise.

Repository: guacamole-client
Updated Branches:
  refs/heads/master 9d09f0bb0 -> d22f065fe


GUACAMOLE-526: Invoke logout() for the cached token BEFORE storing the new token. The logout() call erroneously invalidates the new token otherwise.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/089113c3
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/089113c3
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/089113c3

Branch: refs/heads/master
Commit: 089113c35264172531c2a9d05542a58c4c2542c4
Parents: 9d09f0b
Author: Michael Jumper <mj...@apache.org>
Authored: Sun Apr 29 22:01:32 2018 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Sun Apr 29 22:01:32 2018 -0700

----------------------------------------------------------------------
 .../src/main/webapp/app/auth/service/authenticationService.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/089113c3/guacamole/src/main/webapp/app/auth/service/authenticationService.js
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/auth/service/authenticationService.js b/guacamole/src/main/webapp/app/auth/service/authenticationService.js
index a5c3ee4..53b10c6 100644
--- a/guacamole/src/main/webapp/app/auth/service/authenticationService.js
+++ b/guacamole/src/main/webapp/app/auth/service/authenticationService.js
@@ -168,7 +168,6 @@ angular.module('auth').factory('authenticationService', ['$injector',
         .then(function authenticationSuccessful(data) {
 
             var currentToken = service.getCurrentToken();
-            setAuthenticationResult(new AuthenticationResult(data));
 
             // If a new token was received, ensure the old token is invalidated,
             // if any, and notify listeners of the new token
@@ -180,10 +179,16 @@ angular.module('auth').factory('authenticationService', ['$injector',
                 }
 
                 // Notify of login and new token
+                setAuthenticationResult(new AuthenticationResult(data));
                 $rootScope.$broadcast('guacLogin', data.authToken);
 
             }
 
+            // Update cached authentication result, even if the token remains
+            // the same
+            else
+                setAuthenticationResult(new AuthenticationResult(data));
+
             // Authentication was successful
             return data;
 


[2/2] guacamole-client git commit: GUACAMOLE-526: Merge invoke logout() before storing new token.

Posted by vn...@apache.org.
GUACAMOLE-526: Merge invoke logout() before storing new token.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/d22f065f
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/d22f065f
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/d22f065f

Branch: refs/heads/master
Commit: d22f065fea7acaa086ce9eb593c69d009aee3108
Parents: 9d09f0b 089113c
Author: Nick Couchman <vn...@apache.org>
Authored: Mon Apr 30 07:59:37 2018 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Apr 30 07:59:37 2018 -0400

----------------------------------------------------------------------
 .../src/main/webapp/app/auth/service/authenticationService.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------