Examples of syncChangedUsers()


Examples of org.keycloak.models.UserFederationProviderFactory.syncChangedUsers()

        final UserFederationProviderFactory fedProviderFactory = (UserFederationProviderFactory) sessionFactory.getProviderFactory(UserFederationProvider.class, fedProvider.getProviderName());

        // See when we did last sync.
        int oldLastSync = fedProvider.getLastSync();
        updateLastSyncInterval(sessionFactory, fedProvider, realmId);
        fedProviderFactory.syncChangedUsers(sessionFactory, realmId, fedProvider, Time.toDate(oldLastSync));
    }

    public void refreshPeriodicSyncForProvider(final KeycloakSessionFactory sessionFactory, TimerProvider timer, final UserFederationProviderModel fedProvider, final String realmId) {
        if (fedProvider.getFullSyncPeriod() > 0) {
            // We want periodic full sync for this provider
View Full Code Here

Examples of org.keycloak.services.managers.UsersSyncManager.syncChangedUsers()

            if (model.getId().equals(providerId)) {
                UsersSyncManager syncManager = new UsersSyncManager();
                if ("triggerFullSync".equals(action)) {
                    syncManager.syncAllUsers(session.getKeycloakSessionFactory(), realm.getId(), model);
                } else if ("triggerChangedUsersSync".equals(action)) {
                    syncManager.syncChangedUsers(session.getKeycloakSessionFactory(), realm.getId(), model);
                }
                return Response.noContent().build();
            }
        }
View Full Code Here

Examples of org.keycloak.services.managers.UsersSyncManager.syncChangedUsers()

            assertUserImported(userProvider, testRealm, "user5", "User5FN", "User5LN", "user5@email.org");
            Assert.assertNull(userProvider.getUserByUsername("user6", testRealm));

            // Trigger partial sync
            KeycloakSessionFactory sessionFactory = session.getKeycloakSessionFactory();
            usersSyncManager.syncChangedUsers(sessionFactory, "test", ldapModel);
        } finally {
            keycloakRule.stopSession(session, false);
        }

        session = keycloakRule.startSession();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.