-
-
Save hbrandl/716956 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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