Skip to content

Commit

Permalink
ServerTokenStoreImpl does not publish refresh token events to cluster #…
Browse files Browse the repository at this point in the history
  • Loading branch information
gorbunkov committed Jul 14, 2020
1 parent 0be9381 commit 71bac0d
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,13 @@ public void storeRefreshToken(String refreshTokenValue,
tx.commit();
}
}

if (restConfig.getSyncTokenReplication()) {
clusterManagerAPI.sendSync(new TokenStoreAddRefreshTokenMsg(refreshTokenValue, refreshTokenBytes, authenticationBytes, tokenExpiry, userLogin, null));
} else {
clusterManagerAPI.send(new TokenStoreAddRefreshTokenMsg(refreshTokenValue, refreshTokenBytes, authenticationBytes, tokenExpiry, userLogin, null));
}

}

protected void storeRefreshTokenToMemory(String refreshTokenValue,
Expand Down Expand Up @@ -644,6 +651,12 @@ public void removeRefreshToken(String refreshTokenValue) {
if (restConfig.getRestStoreTokensInDb()) {
removeRefreshTokenFromDatabase(refreshTokenValue);
}

if (restConfig.getSyncTokenReplication()) {
clusterManagerAPI.sendSync(new TokenStoreRemoveRefreshTokenMsg(refreshTokenValue));
} else {
clusterManagerAPI.send(new TokenStoreRemoveRefreshTokenMsg(refreshTokenValue));
}
}

protected void removeRefreshTokenFromMemory(String refreshTokenValue) {
Expand Down

0 comments on commit 71bac0d

Please sign in to comment.