File tree Expand file tree Collapse file tree
server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/session Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -957,8 +957,10 @@ public synchronized void resetAuthToken() throws DBException {
957957 }
958958
959959 public synchronized void updateSMAuthInfo (SMAuthInfo smAuthInfo ) throws DBException {
960- userContext .refresh (smAuthInfo );
961- refreshUserData ();
960+ boolean contextChanged = userContext .refresh (smAuthInfo );
961+ if (contextChanged ) {
962+ refreshUserData ();
963+ }
962964 }
963965
964966 @ Override
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ public WebUserContext(WebApplication application) throws DBException {
6565 * @param smAuthInfo - auth info from security manager
6666 * @throws DBException - if user already authorized and new token come from another user
6767 */
68- public synchronized void refresh (SMAuthInfo smAuthInfo ) throws DBException {
68+ public synchronized boolean refresh (SMAuthInfo smAuthInfo ) throws DBException {
6969 if (smAuthInfo .getAuthStatus () != SMAuthStatus .SUCCESS ) {
7070 throw new DBCException ("Authorization did not complete successfully" );
7171 }
@@ -92,7 +92,7 @@ public synchronized void refresh(SMAuthInfo smAuthInfo) throws DBException {
9292 this .smSessionId = smAuthInfo .getAuthPermissions ().getSessionId ();
9393 setUser (authPermissions .getUserId () == null ? null : new WebUser (securityController .getUserById (authPermissions .getUserId ())));
9494 }
95-
95+ return isSessionChanged ;
9696 }
9797
9898 public synchronized void refreshSMSession () throws DBException {
You can’t perform that action at this time.
0 commit comments