use of org.keycloak.storage.jpa.entity.FederatedUserRequiredActionEntity in project keycloak by keycloak.
the class JpaUserFederatedStorageProvider method addRequiredAction.
@Override
public void addRequiredAction(RealmModel realm, String userId, String action) {
Key key = new FederatedUserRequiredActionEntity.Key(userId, action);
if (em.find(FederatedUserRequiredActionEntity.class, key) == null) {
createIndex(realm, userId);
FederatedUserRequiredActionEntity entity = new FederatedUserRequiredActionEntity();
entity.setUserId(userId);
entity.setRealmId(realm.getId());
entity.setStorageProviderId(new StorageId(userId).getProviderId());
entity.setAction(action);
em.persist(entity);
}
}
Aggregations