Skip to content

Commit

Permalink
Remove debug statements from authorization
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsantos-sfdc committed Mar 26, 2024
1 parent e48c732 commit b3f1093
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions app/controllers/authenticating_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ def heroku_app
dev_app
else
match = request.host.match(/(.*)\-.+\.herokuapp\.com$/)

unless match
raise 'Could not determine heroku app from host'
end
Expand All @@ -21,22 +20,14 @@ def heroku_app

def authenticate_user!
auth_header = request.authorization
puts "Authorization header.xx #{}"
if auth_header
token = auth_header.match(/Bearer (.*)$/)[1]
heroku_api = PlatformAPI.connect_oauth(token)
heroku_api.app.info(heroku_app)
elsif session && session['token'] && session['email']
puts "cookies..xx #{cookies}"
session = cookies.encrypted[:_session_id]
puts "session..xx #{session}"
heroku_api = PlatformAPI.connect_oauth(session['token'])
puts "heroku api client #{heroku_api}"
puts "heroku app #{heroku_app}"
puts "app info without suffix #{heroku_api.app.info('webhooks-demo-marcel-4')}"
heroku_api.app.info(heroku_app)
puts "app info with suffix #{heroku_api.app.info(heroku_app)}"


session['email']
end
Expand Down

0 comments on commit b3f1093

Please sign in to comment.