Get hashed params which will be used when you login, see issue#10
509148
def _get_hashed_params(self, page_text):
        """"""
        soup = BeautifulSoup(page_text, 'html.parser')
        return [tag['name'] for tag in soup.find_all('input', class_='sl')]
522448
def map_search_params(search_params)
      Hash[search_params.map {|k, v| [key_map[k], v] }]
    end
292130
def get_hashed_signature(self, url):
        
        data = "%s%s" % (url, self.association_id)
        if self.session_id:
            data = "%s%s" % (data, self.session_id)
        data_b = bytearray(data, 'utf-8')
        secret_key = base64.b64decode(self.secret_key)
        secret_b = bytearray(secret_key)

        hashed = hmac.new(secret_b, data_b, sha1).digest()
        return base64.b64encode(hashed).decode("utf-8")
35432
def to_query(params)
      unless params.is_a?(Hash)
        raise "Expected Hash but got #{params.class.name}"
      end
      Addressable::URI.form_encode(params)
    end
741269
def update_params_for_auth!(host, path, http_method, header_params, query_params, form_params, auth_names, body)
      Array(auth_names).each do |auth_name|
        if auth_name == "khipu"
          params = query_params.merge(form_params)

          encoded = {}
          params.each do |k, v|
            encoded[percent_encode(k)] = percent_encode(v)
          end

          to_sign = http_method.to_s.upcase + "&" + percent_encode(host + path)

          encoded.keys.sort.each do |key|
            to_sign += "&#{key}=" + encoded[key]
          end
          if !body.nil? && header_params['Content-Type']=='application/json'
             to_sign += "&" + body
          end
          if Configuration.debugging
            Configuration.logger.debug "encoded params: #{encoded}"
            Configuration.logger.debug "string to sign: #{to_sign}"
          end

          hash = OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), Configuration.secret, to_sign)
          header_params['Authorization'] = Configuration.receiver_id.to_s + ":" + hash

          next
        end
        auth_setting = Configuration.auth_settings[auth_name]
        next unless auth_setting
        case auth_setting[:in]
        when 'header' then header_params[auth_setting[:key]] = auth_setting[:value]
        when 'query'  then query_params[auth_setting[:key]] = auth_setting[:value]
        else fail ArgumentError, 'Authentication token must be in `query` of `header`'
        end
      end
    end
991539
def _add_secret_hash(self, parameters, key):
        
        if self.client_secret is not None:
            secret_hash = AWSSRP.get_secret_hash(self.username, self.client_id,
                                                 self.client_secret)
            parameters[key] = secret_hash
405026
def get_param(self):
        
        return dict(userName=self.username, sessionId=self.session_id, database=self.database)
843242
def str_to_hash
        client = RestClient.where(:api_key => @http_headers[@@header_api_key]).first
        if client.nil?
          @errors << "client is not registered"
        end
        client.nil? ? "" : client.secret + @request_uri.gsub( /\?.*/, "" ) + @http_headers[@@header_timestamp]
      end
937427
def get_signature_hash(params, secret)
      Digest::MD5.hexdigest(get_signature_string(params, secret)).to_s
    end
423257
def update_params env, json
        env[FORM_HASH] = json
        env[BODY] = env[FORM_INPUT] = StringIO.new(Rack::Utils.build_query(json))
      end
1353771
def check_auth_params
      if (Fulfil.authentication.nil? || Fulfil.authentication[:subdomain].empty? || Fulfil.authentication[:api_key].empty?)
        raise Fulfil::AuthenticationError, "Please set your subdomain and api key"
      end
    end
757915
def get_resources(url, resource_class, params={})
      get(url, params).map do |result|
        resource_class.from_hash(result, client: self)
      end
    end
1171155
function getUrlGETparams() {
    var vars = {}, hash;
    var hashes = window.location.href.slice( window.location.href.indexOf('?') + 1 ).split('&');
    for( var i = 0; i < hashes.length; i++ ) {
        hash = hashes[i].split('=');
        vars[ hash[0] ] = hash[1];
        // switch on console logging
        if ( hash[0] == 'info') { logInfo = true  }
        if ( hash[0] == 'info' && hash[1] && hash[1] != '') { logInfoStr = hash[1] }
    }
    //alert( JSON.stringify( vars )  );
    return vars;
}
992100
def get_from_params(request, key):
    
    data = getattr(request, 'json', None) or request.values
    value = data.get(key)
    return to_native(value)
432756
def params(self):
        
        params = {}
        params["access_token"] = self.access_token
        params["account_id"] = self.account_id
        return params
801628
def request(params, &block)
      start = Time.now

      dummy_params =  {
        expects: params[:expects],
        method: params[:method],
        body: params[:body]
      }

      text.msg "#{text.color('START', :cyan, :bold)}"
      params.each do |pkey, pvalue|
        text.msg("> #{pkey}: #{pvalue}")
      end

      if params[:token].nil?
        @uname = params[:username]
        @pass = params[:password]
        @cred = "#{@uname}:#{@pass}"
        @final_cred64 = Base64.encode64(@cred)

        @final_hash = { creds: "Basic #{@final_cred64}" }

        response = connection_repo.request(dummy_params, &block)
        text.msg("END(#{(Time.now - start)}s)")
      else

        @tokens = params[:token]
        @final_token = { token: "token #{@tokens}" }
        response = connection_token.request(dummy_params, &block)

        puts response.inspect
        text.msg("END(#{(Time.now - start)}s)")
        # reset (non-persistent) connection
        # @connection_token.reset
      end

      response
    end
710795
def to_params
      attrs = Hash.new
      instance_variables.each do |ivar|
        name = ivar[1..-1]
        attrs[name.to_sym] = instance_variable_get(ivar) if respond_to? "#{name}="
      end
      attrs
    end