Examples of JDBCUserStoreManager


Examples of org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager

        ds.setPassword(dbPassword);

        try {
            RealmConfiguration realmConfig = new RealmConfigXMLProcessor()
                    .buildRealmConfigurationFromFile();
            UserStoreManager userStore = new JDBCUserStoreManager(ds, realmConfig, 0, true);
            userStore.updateCredentialByAdmin(username, password);
            System.out.println("Password updated successfully.");
        } catch (UserStoreException ex) {
            System.err.println("Error updating credentials for user " + username + " : " + ex);
        }
    }
View Full Code Here

Examples of org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager

        return this.realmConfig.getUserStoreProperties();
    }

    public void addRememberMe(String userName, String token)
            throws org.wso2.carbon.user.api.UserStoreException {
        JDBCUserStoreManager jdbcUserStore = new JDBCUserStoreManager(dataSource, realmConfig,
                realmConfig.getTenantId(), false);
        jdbcUserStore.addRememberMe(userName, token);
    }
View Full Code Here

Examples of org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager

    public boolean isValidRememberMeToken(String userName, String token)
                                                                        throws org.wso2.carbon.user.api.UserStoreException {
        try {
            if (this.isExistingUser(userName)) {
                JDBCUserStoreManager jdbcUserStore =
                                                     new JDBCUserStoreManager(
                                                                              dataSource,
                                                                              realmConfig,
                                                                              realmConfig.getTenantId(),
                                                                              false);
                return jdbcUserStore.isExistingRememberMeToken(userName, token);
            }
        } catch (Exception e) {
            log.error("Validating remember me token failed for" + userName);
            // not throwing exception.
            // because we need to seamlessly direct them to login uis
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.