private Integer _defaultAmount = DEFAULT_AMOUNT;
@Override
public boolean isAuthorized(String userId, IChannelPreferences cPrefs) {
IPreferences p = _preferencesDAO.getPreferences(userId);
if (p == null) {
return false;
}
String prefSecret = p.getParams().get(SECRET);
String reqSecret = cPrefs.getParams().get(SECRET);
return prefSecret != null && StringUtils.equals(prefSecret, reqSecret);
}