* {@inheritDoc}
*/
@Override
public TokenInfo getTokenInfo(SecurityToken securityToken, ConsumerInfo consumerInfo, String serviceName,
String tokenName) throws GadgetException {
OAuthTokenInfo oAuthTokenInfo = tokenInfoService.findOAuthTokenInfo(
securityToken.getViewerId(), securityToken.getAppUrl(),
OAuthTokenInfo.MODULE_ID, tokenName, serviceName);
if (oAuthTokenInfo == null) {
return null;
}
return new TokenInfo(oAuthTokenInfo.getAccessToken(), oAuthTokenInfo.getTokenSecret(),
oAuthTokenInfo.getSessionHandle(), oAuthTokenInfo.getTokenExpireMillis());
}