Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed debug output

  • Loading branch information...
commit f9d8cf797c32e44c6f098fc913f5c48f7a576700 1 parent 6ad073e
@oleriesenberg authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/buddy/middleware.rb
View
8 lib/buddy/middleware.rb
@@ -57,7 +57,7 @@ def call(env)
if signed_request
signature, signed_params = signed_request.split('.')
- unless signed_request_is_valid?(Buddy.current_config['secret'], signature, signed_params)
+ unless signed_request_is_valid?(Buddy.config['secret'], signature, signed_params)
return Rack::Response.new(["Invalid Facebook signature"], 400).finish
end
@@ -66,8 +66,8 @@ def call(env)
env['rack.request.form_hash'] ? env['rack.request.form_hash'].merge!({'fb' => signed_params}) : env['rack.request.form_hash'] = {'fb' => signed_params}
set_session(signed_params)
- elsif @request.cookies["fbs_#{Buddy.current_config['app_id']}"]
- payload = @request.cookies["fbs_#{Buddy.current_config['app_id']}"].chomp('"')
+ elsif @request.cookies["fbs_#{Buddy.config['app_id']}"]
+ payload = @request.cookies["fbs_#{Buddy.config['app_id']}"].chomp('"')
payload.sub!('"', '') if payload.start_with?('"')
set_session(Rack::Utils.parse_query(payload))
end
@@ -98,7 +98,7 @@ def set_session(payload)
access_token = payload['oauth_token'] || payload['access_token']
expires = payload['expires']
- @request.session['facebook_session'] = Buddy::Session.create(Buddy.current_config['app_id'], Buddy.current_config['secret'])
+ @request.session['facebook_session'] = Buddy::Session::User.create(Buddy.config['app_id'], Buddy.config['secret'])
@request.session['facebook_session'].secure!(uid.to_i, access_token, expires.to_i) unless uid.blank? or access_token.blank?
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.