use of org.keycloak.storage.jpa.entity.FederatedUser in project keycloak by keycloak.
the class JpaUserFederatedStorageProvider method createIndex.
/**
* We create an entry so that its easy to iterate over all things in the database. Specifically useful for export
*/
protected void createIndex(RealmModel realm, String userId) {
if (em.find(FederatedUser.class, userId) == null) {
FederatedUser fedUser = new FederatedUser();
fedUser.setId(userId);
fedUser.setRealmId(realm.getId());
fedUser.setStorageProviderId(new StorageId(userId).getProviderId());
em.persist(fedUser);
}
}
Aggregations