use of com.liferay.opensocial.model.OAuthToken in project liferay-ide by liferay.
the class LiferayOAuthStore method getOAuthToken.
protected OAuthToken getOAuthToken(SecurityToken securityToken, String serviceName, String tokenName) throws GadgetException {
long userId = GetterUtil.getLong(securityToken.getViewerId());
OAuthToken oAuthToken = null;
try {
oAuthToken = OAuthTokenLocalServiceUtil.fetchOAuthToken(userId, securityToken.getAppId(), serviceName, securityToken.getModuleId(), tokenName);
} catch (SystemException se) {
throw new GadgetException(GadgetException.Code.INTERNAL_SERVER_ERROR, se);
}
return oAuthToken;
}
Aggregations