mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-09 23:12:06 -03:30
Avoid deleting old client sessions
Closes #41427 Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
This commit is contained in:
parent
7767717d17
commit
8d052f015b
@ -398,13 +398,8 @@ public class InfinispanUserSessionProvider implements UserSessionProvider, Sessi
|
||||
return null;
|
||||
}
|
||||
|
||||
AuthenticatedClientSessionAdapter clientAdapter = importClientSession((UserSessionAdapter) userSession, clientSession, getTransaction(offline),
|
||||
return importClientSession((UserSessionAdapter<?>) userSession, clientSession, getTransaction(offline),
|
||||
getClientSessionTransaction(offline), offline, true);
|
||||
|
||||
if (clientAdapter == null) {
|
||||
persister.removeClientSession(userSession.getId(), client.getId(), offline);
|
||||
}
|
||||
return clientAdapter;
|
||||
}
|
||||
|
||||
private AuthenticatedClientSessionEntity getClientSessionEntity(UUID id, boolean offline) {
|
||||
|
||||
@ -125,9 +125,8 @@ public class ClientSessionPersistentChangelogBasedTransaction extends Persistent
|
||||
|
||||
SessionEntityWrapper<AuthenticatedClientSessionEntity> authenticatedClientSessionEntitySessionEntityWrapper = importClientSession(realm, client, userSession, clientSession, clientSessionId);
|
||||
if (authenticatedClientSessionEntitySessionEntityWrapper == null) {
|
||||
LOG.debugf("Client-session not imported from persister. It is going to be removed. userSessionId=%s, clientSessionId=%s, clientId=%s, offline=%s",
|
||||
LOG.debugf("Client-session not imported from persister. userSessionId=%s, clientSessionId=%s, clientId=%s, offline=%s",
|
||||
userSession.getId(), clientSessionId, client.getId(), offline);
|
||||
persister.removeClientSession(userSession.getId(), client.getId(), offline);
|
||||
}
|
||||
|
||||
return authenticatedClientSessionEntitySessionEntityWrapper;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user