public
Description: OpenID authentication plugin
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/open_id_authentication.git
Changed default identity url parameter from "openid_url" to "openid_identifier" 
as recommended in the OpenID 2.0 spec
josh (author)
Sun Jul 27 15:07:35 -0700 2008
commit  9efbd254f3b274a52f8517cc631201b8b0224bde
tree    0f4719df98aab8afb4cc76103ab3e677aa171a72
parent  8a47d6e5da4e333e59e161410b0f45f237408548
...
 
 
1
2
3
...
1
2
3
4
5
0
@@ -1,3 +1,5 @@
0
+* OpenID 2.0 recommends that forms should use the field name "openid_identifier" rather than "openid_url" [Josh Peek]
0
+
0
 * Return open_id_response.display_identifier to the application instead of .endpoints.claimed_id. [nbibler]
0
 
0
 * Add Timeout protection [Rick]
0
...
90
91
92
93
94
 
 
95
96
97
...
90
91
92
 
 
93
94
95
96
97
0
@@ -90,8 +90,8 @@ app/views/sessions/new.erb
0
     </p>
0
 
0
     <p>
0
-      <label for="openid_url">OpenID:</label>
0
-      <%= text_field_tag "openid_url" %>
0
+      <label for="openid_identifier">OpenID:</label>
0
+      <%= text_field_tag "openid_identifier" %>
0
     </p>
0
 
0
     <p>
...
83
84
85
86
 
87
88
 
 
 
 
 
89
90
91
92
 
 
 
 
 
93
94
95
...
83
84
85
 
86
87
 
88
89
90
91
92
93
94
95
 
96
97
98
99
100
101
102
103
0
@@ -83,13 +83,21 @@ module OpenIdAuthentication
0
       OpenIdAuthentication.normalize_url(url)
0
     end
0
 
0
-    # The parameter name of "openid_url" is used rather than the Rails convention "open_id_url"
0
+    # The parameter name of "openid_identifier" is used rather than the Rails convention "open_id_identifier"
0
     # because that's what the specification dictates in order to get browser auto-complete working across sites
0
-    def using_open_id?(identity_url = params[:openid_url]) #:doc:
0
+    def using_open_id?(identity_url = params[:openid_identifier]) #:doc:
0
+      if params.has_key?(:openid_url)
0
+        puts '[OPENID] The conventional field name has changed from "openid_url" to "openid_identifier"'
0
+      end
0
+
0
       !identity_url.blank? || params[:open_id_complete]
0
     end
0
 
0
-    def authenticate_with_open_id(identity_url = params[:openid_url], options = {}, &block) #:doc:
0
+    def authenticate_with_open_id(identity_url = params[:openid_identifier], options = {}, &block) #:doc:
0
+      if params.has_key?(:openid_url)
0
+        puts '[OPENID] The conventional field name has changed from "openid_url" to "openid_identifier"'
0
+      end
0
+
0
       if params[:open_id_complete].nil?
0
         begin_open_id_authentication(identity_url, options, &block)
0
       else

Comments