Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remved patches to request proxy for rack request.

  • Loading branch information...
commit 754e40e930390c092cdf48c9e4270017fbc1ed65 1 parent 31e9b26
@bananagi bananagi authored
View
20 lib/opensocial-wap/oauth/request_proxy/exclude_post_params_from_signature.rb
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-require 'oauth/request_proxy/rack_request'
-
-module OpensocialWap::OAuth::RequestProxy
- module ExcludePostParamsFromSignature
- def self.included(base)
- base.class_eval do
- # Do not use POST parameters for parameters_for_signature.
- def parameters_for_signature
- # signature用パラメータから、POSTパラメータを削除.
- super.reject { |k,v| request_params.has_key?(k)}
- end
- end
- end
- end
-end
-
-class OAuth::RequestProxy::RackRequest
- include ::OpensocialWap::OAuth::RequestProxy::ExcludePostParamsFromSignature
-end
View
36 lib/opensocial-wap/oauth/request_proxy/rack_request_patch.rb
@@ -1,36 +0,0 @@
-# -*- coding: utf-8 -*-
-require 'oauth/request_proxy/rack_request'
-
-module OpensocialWap::OAuth::RequestProxy
- module RackRequestPatch
- def self.included(base)
- base.class_eval do
-
- private
-
- # request.POST は env["rack.request.form_hash"] の値を返すが、POSTデータ中に
- # "..var%5Bkey%5D=123.." のような部分があると、"var"=>{"key"=>"123"} という
- # 形式に変換してしまう.
- # これを、"var[key]"=>"123" を返すように修正する.
- def request_params
- post = request.POST
- form_params = request.env['rack.request.form_vars']
- if form_params && form_params.size > 0
- form_params.split('&').inject({}) do |hsh, i|
- kv = i.split('=')
- hsh[::Rack::Utils::unescape(kv[0])] = kv[1] ? ::Rack::Utils::unescape(kv[1]) : ''
- hsh
- end
- else
- {}
- end
- end
- end
- end
- end
-end
-
-class OAuth::RequestProxy::RackRequest
- include ::OpensocialWap::OAuth::RequestProxy::RackRequestPatch
-end
-
Please sign in to comment.
Something went wrong with that request. Please try again.