Examples of UserRealm


Examples of org.wso2.carbon.user.core.UserRealm

    @SuppressWarnings("unchecked")
    public UserRealm initializeRealm(RealmConfiguration realmConfig, int tenantId)
            throws UserStoreException {
        ClaimBuilder.setBundleContext(bc);
        ProfileConfigurationBuilder.setBundleContext(bc);
        UserRealm userRealm = null;
        try {
            Class clazz = Class.forName(realmConfig.getRealmClassName());
            userRealm = (UserRealm) clazz.newInstance();
            userRealm.init(realmConfig, properties, tenantId);
        } catch (Exception e) {
            String msg = "Cannot initialize the realm.";
            log.error(msg, e);
            throw new UserStoreException(msg, e);
        }
View Full Code Here

Examples of org.wso2.carbon.user.core.UserRealm

    private static void loadData() {
        synchronized (loadlock) {
            if (isEmailUserName == null) {
                try {
                    if (realmService != null) {
                        UserRealm realm = (UserRealm)realmService.getBootstrapRealm();
                        RealmConfiguration realmConfig = realm.getRealmConfiguration();

                        if (isCrossTenantUniqueUserName == null) {
                            String isUnique = realmConfig
                                    .getUserStoreProperty(UserCoreConstants.RealmConfig.PROPERTY_USERNAME_UNIQUE);
                            if ("true".equals(isUnique)) {
View Full Code Here

Examples of org.wso2.carbon.user.core.UserRealm

                // the tenant is not active.
                String msg = "The tenant is not active. tenant id: " + tenantId + ".";
                log.error(msg);
                throw new RegistryException(msg);
            }
            UserRealm userRealm;
            try {
                userRealm = (UserRealm)realmService.getTenantUserRealm(tenantId);
            } catch (Exception e) {
                String msg = "Failed in getting the user realm for the tenant id: " + tenantId;
                log.error(msg);
                throw new RegistryException(msg, e);
            }
            UserStoreManager authenticator;
            try {
                authenticator = userRealm.getUserStoreManager();
            } catch (Exception e) {
                String msg = "Failed in getting the user realm for the tenant id: " + tenantId;
                log.error(msg);
                throw new RegistryException(msg, e);
            }
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.