To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / .svn / pristine / b7 / b71d26113de106cfa8f53a03df10400eb394a685.svn-base @ 1297:0a574315af3e

History | View | Annotate | Download (651 Bytes)

1
module OpenIdAuthentication
2
  module Request
3
    def self.included(base)
4
      base.alias_method_chain :request_method, :openid
5
    end
6

    
7
    def request_method_with_openid
8
      if !parameters[:_method].blank? && parameters[:open_id_complete] == '1'
9
        parameters[:_method].to_sym
10
      else
11
        request_method_without_openid
12
      end
13
    end
14
  end
15
end
16

    
17
# In Rails 2.3, the request object has been renamed
18
# from AbstractRequest to Request
19
if defined? ActionController::Request
20
  ActionController::Request.send :include, OpenIdAuthentication::Request
21
else
22
  ActionController::AbstractRequest.send :include, OpenIdAuthentication::Request
23
end