def authorize(channel, callback)
      if is_private_channel(channel.name)
        auth_data = get_private_auth(channel)
      elsif is_presence_channel(channel.name)
        auth_data = get_presence_auth(channel)
      end
      # could both be nil if didn't require auth
      callback.call(channel, auth_data, channel.user_data)
    end
def authorize(channel, callback)
      if is_private_channel(channel.name)
        auth_data = get_private_auth(channel)
      elsif is_presence_channel(channel.name)
        auth_data = get_presence_auth(channel)
      end
      # could both be nil if didn't require auth
      callback.call(channel, auth_data, channel.user_data)
    end
auth for private and presence