return new ConsumerInfo(consumer, cks.getKeyName(), callback);
}
private BasicOAuthStoreTokenIndex makeBasicOAuthStoreTokenIndex(
SecurityToken securityToken, String serviceName, String tokenName) {
BasicOAuthStoreTokenIndex tokenKey = new BasicOAuthStoreTokenIndex();
tokenKey.setGadgetUri(securityToken.getAppUrl());
// TODO: tung.dang need to improve, why moduleId different each time?.
//tokenKey.setModuleId(securityToken.getModuleId());
tokenKey.setServiceName(serviceName);
tokenKey.setTokenName(tokenName);
tokenKey.setUserId(securityToken.getViewerId());
return tokenKey;
}