Hi,
since open_id_authentication is now build on top of Rack::OpenID, the gem is not working anymore.
Here the changes i found for now.
the exception class OpenIdAuthentication::InvalidOpenId was removed as well as the method OpenIdAuthentification.normalize_identifier
These are use in
# file lib/authlogic_openid/acts_as_authentic.rb, line 55
```
def openid_identifier=(value)
write_attribute(:openid_identifier, value.blank? ? nil : OpenIdAuthentication.normalize_identifier(value))
reset_persistence_token if openid_identifier_changed?
rescue OpenIdAuthentication::InvalidOpenId => e
@openid_error = e.message
end
```
# File lib/authlogic_openid/session.rb, line 50
```
def openid_identifier=(value)
@openid_identifier = value.blank? ? nil : OpenIdAuthentication.normalize_identifier(value)
@openid_error = nil
rescue OpenIdAuthentication::InvalidOpenId => e
@openid_identifier = nil
@openid_error = e.message
end
```
I manually included the old version of OpenIdAuthentication in the UserSessions controller.
Seems to work for the most part (sort of, and only with the plugin of authlogic-oid, not the gem), but I still haven't quite figured how to make auto_register work.
Yes, mreinsch has fixed the authlogic_openid plugin so that it works with the new openid_authentication:
http://github.com/mreinsch/authlogic_openid/tree/master
:)
Yep. Remove the gem, install the plugin. If you are using postgresql or memcached gem use my version instead of mreinsch (otherwise stick to mreinsch's -- it's more tested)
I'm still having difficulty. Would you mind reviewing my 'stack' to see what I'm missing?
I started with the authlogic_example application, then tried to add open-id support using the instructions listed on mreinsch's git repository page (http://github.com/mreinsch/authlogic_openid).
1). authlogic_sample application configured and working
2). added migration to add open-id support to User model; ran migration; columns added as expected
3). added open_id_authentication plugin ($ script/plugin install git://github.com/rails/open_id_authentication.git)
4). verified gem installation: authlogic (2.1.3), ruby-open-id (2.1.7), rack-open-id (1.0.3); I removed the authlogic-oid gem, per your instructions; added references to two gems in environment.rb (config.gem "authlogic"; config.gem "ruby-openid", :lib=> "openid")
5). installed the authlogic-oid plugin ($ script/plugin install git://github.com/binarylogic/authlogic_openid.git)
6). made changes to the UsersController and UserSessionsController to use blocks to save each.
7). made changes to new user-sessions view to support open id (f.text_field :openid_identifier)
8). restarted mongrel
When I attempt to create a new session using my open id provider, I get an error that occurs in the UserSessionsController that reads:
uninitialized constant OpenIdAuthentication::InvalidOpenId
thoughts? what am i missing?
thanks.
In 3: should be git://github.com/_glebm_/open_id_authentication.git
4. uninstall ruby-openid, then do script/plugin install git://github.com/glebm/ruby-openid.git
If you don't use memcached gem, mreinsch's fork is better since it has a more elegant solution to the infinite loop problem.
The official repo seems to be completely dead.