Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Change password validation option when included, and prepend the Open…

…ID module.
  • Loading branch information...
commit 4c1b7c12cbee329f90bdfd0490d578acd8383a04 1 parent 83f05ca
@binarylogic authored
View
6 CHANGELOG.rdoc
@@ -1,3 +1,7 @@
-== 1.0.0
+== 1.0.1 released 2009-3-30
+
+* Change password validation option when included, and prepend the OpenID module.
+
+== 1.0.0 released 2009-3-30
* Initial release
View
38 Manifest.txt
@@ -0,0 +1,38 @@
+CHANGELOG.rdoc
+MIT-LICENSE
+Manifest.txt
+README.rdoc
+Rakefile
+init.rb
+lib/authlogic_openid.rb
+lib/authlogic_openid/acts_as_authentic.rb
+lib/authlogic_openid/session.rb
+lib/authlogic_openid/version.rb
+test/acts_as_authentic_test.rb
+test/fixtures/users.yml
+test/libs/open_id_authentication/CHANGELOG
+test/libs/open_id_authentication/README
+test/libs/open_id_authentication/Rakefile
+test/libs/open_id_authentication/generators/open_id_authentication_tables/open_id_authentication_tables_generator.rb
+test/libs/open_id_authentication/generators/open_id_authentication_tables/templates/migration.rb
+test/libs/open_id_authentication/generators/upgrade_open_id_authentication_tables/templates/migration.rb
+test/libs/open_id_authentication/generators/upgrade_open_id_authentication_tables/upgrade_open_id_authentication_tables_generator.rb
+test/libs/open_id_authentication/init.rb
+test/libs/open_id_authentication/lib/open_id_authentication.rb
+test/libs/open_id_authentication/lib/open_id_authentication/association.rb
+test/libs/open_id_authentication/lib/open_id_authentication/db_store.rb
+test/libs/open_id_authentication/lib/open_id_authentication/mem_cache_store.rb
+test/libs/open_id_authentication/lib/open_id_authentication/nonce.rb
+test/libs/open_id_authentication/lib/open_id_authentication/request.rb
+test/libs/open_id_authentication/lib/open_id_authentication/timeout_fixes.rb
+test/libs/open_id_authentication/tasks/open_id_authentication_tasks.rake
+test/libs/open_id_authentication/test/mem_cache_store_test.rb
+test/libs/open_id_authentication/test/normalize_test.rb
+test/libs/open_id_authentication/test/open_id_authentication_test.rb
+test/libs/open_id_authentication/test/status_test.rb
+test/libs/open_id_authentication/test/test_helper.rb
+test/libs/rails_trickery.rb
+test/libs/user.rb
+test/libs/user_session.rb
+test/session_test.rb
+test/test_helper.rb
View
5 README.rdoc
@@ -2,6 +2,11 @@
Authlogic OpenID is an extension of the Authlogic library to add OpenID support. Authlogic v2.0 introduced an enhanced API that makes "plugging in" alternate authentication methods as easy as installing a gem.
+== Helpful links
+
+* <b>Documentation:</b> http://authlogic.rubyforge.org
+* <b>Authlogic:</b> http://github.com/binarylogic/authlogic
+
== Install and use
=== 1. Make some simple changes to your database:
View
2  Rakefile
@@ -6,6 +6,7 @@ require File.dirname(__FILE__) << "/lib/authlogic_openid/version"
Hoe.new("Authlogic OpenID", AuthlogicOpenid::Version::STRING) do |p|
p.name = "authlogic-oid"
+ p.rubyforge_name = "authlogic-oid"
p.author = "Ben Johnson of Binary Logic"
p.email = 'bjohnson@binarylogic.com'
p.summary = "Extension of the Authlogic library to add OpenID support."
@@ -14,6 +15,7 @@ Hoe.new("Authlogic OpenID", AuthlogicOpenid::Version::STRING) do |p|
p.history_file = "CHANGELOG.rdoc"
p.readme_file = "README.rdoc"
p.extra_rdoc_files = ["CHANGELOG.rdoc", "README.rdoc"]
+ p.remote_rdoc_dir = ''
p.test_globs = ["test/*/test_*.rb", "test/*_test.rb", "test/*/*_test.rb"]
p.extra_deps = %w(authlogic)
end
View
6 lib/authlogic_openid.rb
@@ -2,5 +2,7 @@
require "authlogic_openid/acts_as_authentic"
require "authlogic_openid/session"
-ActiveRecord::Base.send(:include, AuthlogicOpenid::ActsAsAuthentic)
-Authlogic::Session::Base.send(:include, AuthlogicOpenid::Session)
+config.to_prepare do
+ ActiveRecord::Base.send(:include, AuthlogicOpenid::ActsAsAuthentic)
+ Authlogic::Session::Base.send(:include, AuthlogicOpenid::Session)
+end
View
8 lib/authlogic_openid/acts_as_authentic.rb
@@ -8,10 +8,7 @@ module ActsAsAuthentic
# OpenID is being used.
def self.included(klass)
klass.class_eval do
- add_acts_as_authentic_module(Methods)
- validates_length_of_password_field_options validates_length_of_password_field_options.merge(:if => :validate_password_with_openid?)
- validates_confirmation_of_password_field_options validates_confirmation_of_password_field_options.merge(:if => :validate_password_with_openid?)
- validates_length_of_password_confirmation_field_options validates_length_of_password_confirmation_field_options.merge(:if => :validate_password_with_openid?)
+ add_acts_as_authentic_module(Methods, :prepend)
end
end
@@ -21,6 +18,9 @@ def self.included(klass)
klass.class_eval do
validates_uniqueness_of :openid_identifier, :scope => validations_scope, :if => :using_openid?
validate :validate_openid
+ validates_length_of_password_field_options validates_length_of_password_field_options.merge(:if => :validate_password_with_openid?)
+ validates_confirmation_of_password_field_options validates_confirmation_of_password_field_options.merge(:if => :validate_password_with_openid?)
+ validates_length_of_password_confirmation_field_options validates_length_of_password_confirmation_field_options.merge(:if => :validate_password_with_openid?)
end
end
View
2  lib/authlogic_openid/version.rb
@@ -41,7 +41,7 @@ def to_a
MAJOR = 1
MINOR = 0
- TINY = 0
+ TINY = 1
# The current version as a Version instance
CURRENT = new(MAJOR, MINOR, TINY)
Please sign in to comment.
Something went wrong with that request. Please try again.