Package org.keycloak.models

Examples of org.keycloak.models.UserFederationProviderFactory


        Assert.assertEquals("dummy", ldap.getProviderName());
        Assert.assertEquals(1, ldap.getPriority());
        Assert.assertEquals("ldap://foo", ldap.getConfig().get("important.config"));

        // Assert that federation link wasn't created during import
        UserFederationProviderFactory factory = (UserFederationProviderFactory)session.getKeycloakSessionFactory().getProviderFactory(UserFederationProvider.class, "dummy");
        Assert.assertNull(factory.getInstance(session, null).getUserByUsername(realm, "wburke"));
    }
View Full Code Here


            }
        });
    }

    public void syncAllUsers(final KeycloakSessionFactory sessionFactory, String realmId, final UserFederationProviderModel fedProvider) {
        final UserFederationProviderFactory fedProviderFactory = (UserFederationProviderFactory) sessionFactory.getProviderFactory(UserFederationProvider.class, fedProvider.getProviderName());
        updateLastSyncInterval(sessionFactory, fedProvider, realmId);
        fedProviderFactory.syncAllUsers(sessionFactory, realmId, fedProvider);
    }
View Full Code Here

        updateLastSyncInterval(sessionFactory, fedProvider, realmId);
        fedProviderFactory.syncAllUsers(sessionFactory, realmId, fedProvider);
    }

    public void syncChangedUsers(final KeycloakSessionFactory sessionFactory, String realmId, final UserFederationProviderModel fedProvider) {
        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));
    }
View Full Code Here

TOP

Related Classes of org.keycloak.models.UserFederationProviderFactory

Copyright © 2018 www.massapicom. 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.