Skip to content

Instantly share code, notes, and snippets.

@hbrandl
Forked from xxx/gist:706255
Created November 26, 2010 16:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hbrandl/716956 to your computer and use it in GitHub Desktop.
Save hbrandl/716956 to your computer and use it in GitHub Desktop.
#FIXXME OpenID still not working
if Rails.env.production?
#overwriting omniauth-347a66e3d4f1/oa-core/lib/omniauth/strategy.rb
module OmniAuth
module Strategy
def full_host
uri = URI.parse(request.url)
uri.path = ''
uri.query = nil
uri.port = (uri.scheme == 'https' ? 443 : 80)
uri.to_s
end
end
end
#overwriting omniauth-347a66e3d4f1/oa-openid/lib/omniauth/strategies/open_id.rb
module OmniAuth
module Strategies
class OpenID
def callback_url
uri = URI.parse(request.url)
uri.port = 80
uri.path += '/callback'
uri.to_s
end
end
end
end
#overwriting rack-openid-1.2.0/lib/rack/openid.rb
module Rack
class OpenID
private
def realm_url(req)
url = req.scheme + "://"
url << req.host
#scheme, port = req.scheme, req.port
#if scheme == "https" && port != 443 ||
# scheme == "http" && port != 80
# url << ":#{port}"
#end
url
end
end
end
end #if Rails.env.production?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment