Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ public ModelVersion getVersion() {

@Override
public void migrate(KeycloakSession session) {
// Can be null during store model tests.
if (session.sessions() != null) {
// Offer a migration for persistent user sessions which was added in KC25.
session.sessions().migrate(VERSION.toString());
}

session.realms().getRealmsStream().forEach(realm -> migrateRealm(session, realm));
}

Expand All @@ -66,8 +72,6 @@ protected void migrateRealm(KeycloakSession session, RealmModel realm) {
LOG.warnf("Client scope '%s' already exists in the realm '%s'. Please migrate this realm manually if you need basic claims in your tokens.", basicScope.getName(), realm.getName());
}

// offer a migration for persistent user sessions which was added in KC25
session.sessions().migrate(VERSION.toString());
}
}