Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Well...</p> <p>The 403 error was because hosting security rules were so strict what Google's OpenID response (long enough to be suspicious) was rejected. Resolved by hosting support.</p> <p>To resolve the problem with port number within return_to parameter (addressed by <a href="https://stackoverflow.com/questions/4051577/openid-for-rails-app-behind-apache/4105561#4105561">freiwillen</a>) I've made the following (monkey path) initializer:</p> <pre><code>module OmniAuth module Strategies # OmniAuth strategy for connecting via OpenID. This allows for connection # to a wide variety of sites, some of which are listed [on the OpenID website](http://openid.net/get-an-openid/). class OpenID protected def callback_url uri = URI.parse(request.url) uri.path += '/callback' # by KirylP: to overcome hosting subdomain forwarding to rails port uri.port = '' if request.env.has_key? 'HTTP_X_FORWARDED_SERVER' uri.to_s end end end end module Rack class OpenID SERVER_PORT_TO_AVOID = 12002 private def realm_url(req) url = req.scheme + "://" url &lt;&lt; req.host scheme, port = req.scheme, req.port if scheme == "https" &amp;&amp; port != 443 || scheme == "http" &amp;&amp; port != 80 url &lt;&lt; ":#{port}" if port != SERVER_PORT_TO_AVOID # KirylP end url end end end module OpenID class Consumer def complete(query, current_url) message = Message.from_post_args(query) current_url.sub!(":#{Rack::OpenID::SERVER_PORT_TO_AVOID}", '') # KirylP mode = message.get_arg(OPENID_NS, 'mode', 'invalid') begin meth = method('complete_' + mode) rescue NameError meth = method(:complete_invalid) end response = meth.call(message, current_url) cleanup_last_requested_endpoint if [SUCCESS, CANCEL].member?(response.status) cleanup_session end return response end end end </code></pre> <p>I hope someone will propose more elegant solution.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload