Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
Bumped to 0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
xanagi committed Jul 5, 2011
2 parents 4be55de + 5a7cf12 commit 20d71c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/opensocial-wap/rack/opensocial_oauth.rb
Expand Up @@ -82,7 +82,7 @@ def remove_utf8_form_input_tag(str)
else
str
end
end
end

def unauthorized
[ 401,
Expand Down
6 changes: 3 additions & 3 deletions lib/opensocial-wap/session/opensocial_wap_sid.rb
Expand Up @@ -18,7 +18,7 @@ def self.included(base)
# request.params メソッドを使用しないこと(文字コード変換で問題が発生するため).
def extract_session_id(env)
stale_session_check! do
request = ActionDispatch::Request.new(env)
request = ::Rack::Request.new(env)
if use_opensocial_wap_sid?(request)
# opensocial_(viewer|owner)_id をsession_idとして使用.
sid = opensocial_user_id(request)
Expand All @@ -44,7 +44,7 @@ def use_opensocial_wap_sid?(request)
sid = app_config.opensocial_wap[:session_id] || :cookie # デフォルトでは無効(cookieからセッションIDを取得する).
if sid.to_sym == :parameter
# OAuthの検証にパスしている.
if request.opensocial_oauth_verified?
if request.env['opensocial-wap.oauth-verified']
# opensocial_(viewer|owner)_id がクエリパラメータに存在する.
if opensocial_user_id(request)
return true
Expand All @@ -58,7 +58,7 @@ def use_opensocial_wap_sid?(request)
def opensocial_user_id(request)
unless @opensocial_user_id
params = begin
request.GET.update(request.POST)
request.GET.merge(request.POST)
rescue EOFError => e
request.GET
end
Expand Down

0 comments on commit 20d71c5

Please sign in to comment.