Examples of OAuthConsumerDAO


Examples of org.wso2.carbon.identity.core.dao.OAuthConsumerDAO

    private static String AUTHORIZE_TOKEN = "OAuth.AuthorizeUrl";

    public void registerOAuthConsumer(String consumerSecret) throws Exception {
        String tenatUser = null;
        String domain = null;
        OAuthConsumerDAO dao = null;
        String consumerKey = null;

        consumerKey = getLoggedInUser();
        if (consumerKey != null) {
            tenatUser = UserCoreUtil.getTenantLessUsername(consumerKey);
            domain = UserCoreUtil.getTenantDomain(OAuthServiceComponent.getRealmService(),
                    consumerKey);
            dao = new OAuthConsumerDAO(IdentityTenantUtil.getRegistry(domain, consumerKey));
            OAuthConsumerDO consumerDO = new OAuthConsumerDO();
            consumerDO.setConsumerKey(tenatUser);
            consumerDO.setConsumerSecret(consumerSecret);
            dao.registerOAuthConsumer(consumerDO);
        }
    }
View Full Code Here

Examples of org.wso2.carbon.identity.core.dao.OAuthConsumerDAO

    }

    private String getOAuthSecretKey(String consumerKey) throws Exception {
        String tenatUser = null;
        String domain = null;
        OAuthConsumerDAO dao = null;

        tenatUser = UserCoreUtil.getTenantLessUsername(consumerKey);
        domain = UserCoreUtil.getTenantDomain(OAuthServiceComponent.getRealmService(), consumerKey);
        dao = new OAuthConsumerDAO(IdentityTenantUtil.getRegistry(domain, consumerKey));
        return dao.getOAuthConsumerSecret(tenatUser);

    }
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.