authlogic 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of authlogic might be problematic. Click here for more details.
- data/CHANGELOG.rdoc +9 -3
- data/Manifest +1 -0
- data/README.rdoc +13 -0
- data/authlogic.gemspec +4 -4
- data/lib/authlogic.rb +1 -0
- data/lib/authlogic/crypto_providers/bcrypt.rb +49 -0
- data/lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/config.rb +11 -1
- data/lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/credentials.rb +11 -4
- data/lib/authlogic/version.rb +1 -1
- data/test/orm_adapters_tests/active_record_adapter_tests/acts_as_authentic_tests/config_test.rb +29 -29
- metadata +4 -2
data/CHANGELOG.rdoc
CHANGED
@@ -1,7 +1,13 @@
|
|
1
|
-
== 1.3.
|
1
|
+
== 1.3.1 released 2008-11-22
|
2
2
|
|
3
|
-
*
|
4
|
-
*
|
3
|
+
* Fixed typo in acts_as_authentic config when passing the :scope option.
|
4
|
+
* Added :act_like_restful_authentication option for acts_as_authentic
|
5
|
+
* Added a new crypto provider: BCrypt, this is for those storing the nuclear launch codes in their apps
|
6
|
+
|
7
|
+
== 1.3.0 released 2008-11-21
|
8
|
+
|
9
|
+
* BREAKS BACKWARDS COMPATIBILITY: changed the confirm_password field to password_confirmation for acts_as_authentic, since the rails validates_confirmation_of handles creating this attribute and there is no option to change the name of this.
|
10
|
+
* BREAKS BACKWARDS COMPATIBILITY: Cleaned up all of the validation configuration for acts_as_authentic, as well as the documentation that goes with it, you can accomplish the same things as before, but this is much more flexible and much more organized. This is mainly for those implementing i18n support. Instead of :whatever_message, its now :login_field_validates_length_of_options => {:message => "your i18n friendly message"}. As a side note, with the new i18n support in rails I would not be surprised if this is already done for you since Authlogic uses the ActiveRecord validation methods.
|
5
11
|
* Got rid of simple delegator for the abstract controller, apparently this has performance issues.
|
6
12
|
* Cleaned up validations to assume ActiveRecord dirty attributes are present, I think this is a safe assumption.
|
7
13
|
|
data/Manifest
CHANGED
@@ -3,6 +3,7 @@ init.rb
|
|
3
3
|
lib/authlogic/controller_adapters/abstract_adapter.rb
|
4
4
|
lib/authlogic/controller_adapters/merb_adapter.rb
|
5
5
|
lib/authlogic/controller_adapters/rails_adapter.rb
|
6
|
+
lib/authlogic/crypto_providers/bcrypt.rb
|
6
7
|
lib/authlogic/crypto_providers/sha1.rb
|
7
8
|
lib/authlogic/crypto_providers/sha512.rb
|
8
9
|
lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/config.rb
|
data/README.rdoc
CHANGED
@@ -363,6 +363,19 @@ Obviously there is a little more to it than this, but hopefully this clarifies a
|
|
363
363
|
|
364
364
|
When things come together like this I think its a sign that you are doing something right. Put that in your pipe and smoke it!
|
365
365
|
|
366
|
+
== Migrating from restful_authentication
|
367
|
+
|
368
|
+
Migrating from the restful_authentication plugin? I made an option especially for you. Just do the following and everything will be taken care of, your users won't even know anything changed:
|
369
|
+
|
370
|
+
# app/models/user.rb
|
371
|
+
class User < ActiveRecord::Base
|
372
|
+
acts_as_authentic :acts_like_restful_authentication => true
|
373
|
+
end
|
374
|
+
|
375
|
+
**What's the difference?**
|
376
|
+
|
377
|
+
restful\_authentication uses Sha1 with 10 stretches to encrypt the password. Authlogic uses Sha512 with 20 stretches. Sha512 is stronger and more secure.
|
378
|
+
|
366
379
|
== Framework agnostic (Rails, Merb, etc.)
|
367
380
|
|
368
381
|
I designed Authlogic to be framework agnostic, meaning it doesn't care what framework you use it in. Right out of the box it supports rails and merb. I have not had the opportunity to use other frameworks, but the only thing stopping Authlogic from being used in other frameworks is a simple adapter. Check out controller_adapters/rails_adapter, or controller_adapters/merb_adapter.
|
data/authlogic.gemspec
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{authlogic}
|
5
|
-
s.version = "1.3.
|
5
|
+
s.version = "1.3.1"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Ben Johnson of Binary Logic"]
|
9
|
-
s.date = %q{2008-11-
|
9
|
+
s.date = %q{2008-11-22}
|
10
10
|
s.description = %q{A clean, simple, and unobtrusive ruby authentication solution.}
|
11
11
|
s.email = %q{bjohnson@binarylogic.com}
|
12
|
-
s.extra_rdoc_files = ["CHANGELOG.rdoc", "lib/authlogic/controller_adapters/abstract_adapter.rb", "lib/authlogic/controller_adapters/merb_adapter.rb", "lib/authlogic/controller_adapters/rails_adapter.rb", "lib/authlogic/crypto_providers/sha1.rb", "lib/authlogic/crypto_providers/sha512.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/config.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/credentials.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/logged_in.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/perishability.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/persistence.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/session_maintenance.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/single_access.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic.rb", "lib/authlogic/orm_adapters/active_record_adapter/authenticates_many.rb", "lib/authlogic/session/active_record_trickery.rb", "lib/authlogic/session/authenticates_many_association.rb", "lib/authlogic/session/base.rb", "lib/authlogic/session/callbacks.rb", "lib/authlogic/session/config.rb", "lib/authlogic/session/cookies.rb", "lib/authlogic/session/errors.rb", "lib/authlogic/session/params.rb", "lib/authlogic/session/perishability.rb", "lib/authlogic/session/scopes.rb", "lib/authlogic/session/session.rb", "lib/authlogic/version.rb", "lib/authlogic.rb", "README.rdoc"]
|
13
|
-
s.files = ["CHANGELOG.rdoc", "init.rb", "lib/authlogic/controller_adapters/abstract_adapter.rb", "lib/authlogic/controller_adapters/merb_adapter.rb", "lib/authlogic/controller_adapters/rails_adapter.rb", "lib/authlogic/crypto_providers/sha1.rb", "lib/authlogic/crypto_providers/sha512.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/config.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/credentials.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/logged_in.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/perishability.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/persistence.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/session_maintenance.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/single_access.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic.rb", "lib/authlogic/orm_adapters/active_record_adapter/authenticates_many.rb", "lib/authlogic/session/active_record_trickery.rb", "lib/authlogic/session/authenticates_many_association.rb", "lib/authlogic/session/base.rb", "lib/authlogic/session/callbacks.rb", "lib/authlogic/session/config.rb", "lib/authlogic/session/cookies.rb", "lib/authlogic/session/errors.rb", "lib/authlogic/session/params.rb", "lib/authlogic/session/perishability.rb", "lib/authlogic/session/scopes.rb", "lib/authlogic/session/session.rb", "lib/authlogic/version.rb", "lib/authlogic.rb", "Manifest", "MIT-LICENSE", "Rakefile", "README.rdoc", "shoulda_macros/authlogic.rb", "test/fixtures/companies.yml", "test/fixtures/employees.yml", "test/fixtures/projects.yml", "test/fixtures/users.yml", "test/libs/aes128_crypto_provider.rb", "test/libs/mock_controller.rb", "test/libs/mock_cookie_jar.rb", "test/libs/mock_request.rb", "test/libs/ordered_hash.rb", "test/orm_adapters_tests/active_record_adapter_tests/acts_as_authentic_tests/config_test.rb", "test/orm_adapters_tests/active_record_adapter_tests/acts_as_authentic_tests/credentials_test.rb", "test/orm_adapters_tests/active_record_adapter_tests/acts_as_authentic_tests/logged_in_test.rb", "test/orm_adapters_tests/active_record_adapter_tests/acts_as_authentic_tests/perishability_test.rb", "test/orm_adapters_tests/active_record_adapter_tests/acts_as_authentic_tests/persistence_test.rb", "test/orm_adapters_tests/active_record_adapter_tests/acts_as_authentic_tests/session_maintenance_test.rb", "test/orm_adapters_tests/active_record_adapter_tests/acts_as_authentic_tests/single_access_test.rb", "test/orm_adapters_tests/active_record_adapter_tests/authenticates_many_test.rb", "test/session_tests/active_record_trickery_test.rb", "test/session_tests/authenticates_many_association_test.rb", "test/session_tests/base_test.rb", "test/session_tests/config_test.rb", "test/session_tests/cookies_test.rb", "test/session_tests/params_test.rb", "test/session_tests/perishability_test.rb", "test/session_tests/scopes_test.rb", "test/session_tests/session_test.rb", "test/test_helper.rb", "authlogic.gemspec"]
|
12
|
+
s.extra_rdoc_files = ["CHANGELOG.rdoc", "lib/authlogic/controller_adapters/abstract_adapter.rb", "lib/authlogic/controller_adapters/merb_adapter.rb", "lib/authlogic/controller_adapters/rails_adapter.rb", "lib/authlogic/crypto_providers/bcrypt.rb", "lib/authlogic/crypto_providers/sha1.rb", "lib/authlogic/crypto_providers/sha512.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/config.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/credentials.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/logged_in.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/perishability.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/persistence.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/session_maintenance.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/single_access.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic.rb", "lib/authlogic/orm_adapters/active_record_adapter/authenticates_many.rb", "lib/authlogic/session/active_record_trickery.rb", "lib/authlogic/session/authenticates_many_association.rb", "lib/authlogic/session/base.rb", "lib/authlogic/session/callbacks.rb", "lib/authlogic/session/config.rb", "lib/authlogic/session/cookies.rb", "lib/authlogic/session/errors.rb", "lib/authlogic/session/params.rb", "lib/authlogic/session/perishability.rb", "lib/authlogic/session/scopes.rb", "lib/authlogic/session/session.rb", "lib/authlogic/version.rb", "lib/authlogic.rb", "README.rdoc"]
|
13
|
+
s.files = ["CHANGELOG.rdoc", "init.rb", "lib/authlogic/controller_adapters/abstract_adapter.rb", "lib/authlogic/controller_adapters/merb_adapter.rb", "lib/authlogic/controller_adapters/rails_adapter.rb", "lib/authlogic/crypto_providers/bcrypt.rb", "lib/authlogic/crypto_providers/sha1.rb", "lib/authlogic/crypto_providers/sha512.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/config.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/credentials.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/logged_in.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/perishability.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/persistence.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/session_maintenance.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/single_access.rb", "lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic.rb", "lib/authlogic/orm_adapters/active_record_adapter/authenticates_many.rb", "lib/authlogic/session/active_record_trickery.rb", "lib/authlogic/session/authenticates_many_association.rb", "lib/authlogic/session/base.rb", "lib/authlogic/session/callbacks.rb", "lib/authlogic/session/config.rb", "lib/authlogic/session/cookies.rb", "lib/authlogic/session/errors.rb", "lib/authlogic/session/params.rb", "lib/authlogic/session/perishability.rb", "lib/authlogic/session/scopes.rb", "lib/authlogic/session/session.rb", "lib/authlogic/version.rb", "lib/authlogic.rb", "Manifest", "MIT-LICENSE", "Rakefile", "README.rdoc", "shoulda_macros/authlogic.rb", "test/fixtures/companies.yml", "test/fixtures/employees.yml", "test/fixtures/projects.yml", "test/fixtures/users.yml", "test/libs/aes128_crypto_provider.rb", "test/libs/mock_controller.rb", "test/libs/mock_cookie_jar.rb", "test/libs/mock_request.rb", "test/libs/ordered_hash.rb", "test/orm_adapters_tests/active_record_adapter_tests/acts_as_authentic_tests/config_test.rb", "test/orm_adapters_tests/active_record_adapter_tests/acts_as_authentic_tests/credentials_test.rb", "test/orm_adapters_tests/active_record_adapter_tests/acts_as_authentic_tests/logged_in_test.rb", "test/orm_adapters_tests/active_record_adapter_tests/acts_as_authentic_tests/perishability_test.rb", "test/orm_adapters_tests/active_record_adapter_tests/acts_as_authentic_tests/persistence_test.rb", "test/orm_adapters_tests/active_record_adapter_tests/acts_as_authentic_tests/session_maintenance_test.rb", "test/orm_adapters_tests/active_record_adapter_tests/acts_as_authentic_tests/single_access_test.rb", "test/orm_adapters_tests/active_record_adapter_tests/authenticates_many_test.rb", "test/session_tests/active_record_trickery_test.rb", "test/session_tests/authenticates_many_association_test.rb", "test/session_tests/base_test.rb", "test/session_tests/config_test.rb", "test/session_tests/cookies_test.rb", "test/session_tests/params_test.rb", "test/session_tests/perishability_test.rb", "test/session_tests/scopes_test.rb", "test/session_tests/session_test.rb", "test/test_helper.rb", "authlogic.gemspec"]
|
14
14
|
s.has_rdoc = true
|
15
15
|
s.homepage = %q{http://github.com/binarylogic/authlogic}
|
16
16
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Authlogic", "--main", "README.rdoc"]
|
data/lib/authlogic.rb
CHANGED
@@ -8,6 +8,7 @@ require File.dirname(__FILE__) + "/authlogic/controller_adapters/merb_adapter" i
|
|
8
8
|
|
9
9
|
require File.dirname(__FILE__) + "/authlogic/crypto_providers/sha1"
|
10
10
|
require File.dirname(__FILE__) + "/authlogic/crypto_providers/sha512"
|
11
|
+
require File.dirname(__FILE__) + "/authlogic/crypto_providers/bcrypt"
|
11
12
|
|
12
13
|
if defined?(ActiveRecord)
|
13
14
|
require File.dirname(__FILE__) + "/authlogic/orm_adapters/active_record_adapter/acts_as_authentic"
|
@@ -0,0 +1,49 @@
|
|
1
|
+
begin
|
2
|
+
require "bcrypt"
|
3
|
+
rescue LoadError
|
4
|
+
end
|
5
|
+
|
6
|
+
module Authlogic
|
7
|
+
module CryptoProviders
|
8
|
+
# = Bcrypt
|
9
|
+
#
|
10
|
+
# For most apps Sha512 is plenty secure, but if you are building an app that stores the nuclear launch codes you might want to consier BCrypt. This is an extremely
|
11
|
+
# secure hashing algorithm, mainly because it is slow. A brute force attack on a BCrypt encrypted password would take much longer than a brute force attack on a
|
12
|
+
# password encrypted with a Sha algorithm. Keep in mind you are sacrificing performance by using this, generating a password takes exponentially longer than any
|
13
|
+
# of the Sha algorithms. I did some benchmarking to save you some time with your decision:
|
14
|
+
#
|
15
|
+
# require "bcrypt"
|
16
|
+
# require "digest"
|
17
|
+
# require "benchmark"
|
18
|
+
#
|
19
|
+
# Benchmark.bm do |x|
|
20
|
+
# x.report("BCrypt:") { BCrypt::Password.create("mypass") }
|
21
|
+
# x.report("Sha512:") { Digest::SHA512.hexdigest("mypass") }
|
22
|
+
# end
|
23
|
+
#
|
24
|
+
# user system total real
|
25
|
+
# BCrypt: 0.110000 0.000000 0.110000 ( 0.113493)
|
26
|
+
# Sha512: 0.010000 0.000000 0.010000 ( 0.000554)
|
27
|
+
#
|
28
|
+
# Decided BCrypt is for you? Just insall the bcrypt gem:
|
29
|
+
#
|
30
|
+
# gem install bcrypt-ruby
|
31
|
+
class Bcrypt
|
32
|
+
class << self
|
33
|
+
def cost
|
34
|
+
@cost ||= 10
|
35
|
+
end
|
36
|
+
attr_writer :cost
|
37
|
+
|
38
|
+
def encrypt(pass)
|
39
|
+
BCrypt::Password.create(pass, :cost => cost)
|
40
|
+
end
|
41
|
+
|
42
|
+
# This does not actually decrypt the password, BCrypt is *not* reversible. The way the bcrypt library is set up requires us to do it this way.
|
43
|
+
def decrypt(crypted_pass)
|
44
|
+
BCrypt::Password.create(crypted_pass)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -22,6 +22,12 @@ module Authlogic
|
|
22
22
|
# * <tt>crypto_provider</tt> - default: Authlogic::CryptoProviders::Sha512,
|
23
23
|
# This is the class that provides your encryption. By default Authlogic provides its own crypto provider that uses Sha512 encrypton.
|
24
24
|
#
|
25
|
+
# * <tt>act_like_restful_authentication</tt> - default: false,
|
26
|
+
# If you are migrating from restful_authentication you will want to set this to true, this way your users will still be able to log in and it will seems as
|
27
|
+
# if nothing has changed. If you don't do this none of your users will be able to log in. If you are starting a new project I do not recommend enabling this
|
28
|
+
# as the password encryption algorithm used in restful_authentication (Sha1) is not as secure as the one used in authlogic (Sha512). IF you REALLY want to be secure
|
29
|
+
# checkout Authlogic::CryptoProviders::BCrypt.
|
30
|
+
#
|
25
31
|
# * <tt>login_field</tt> - default: :login, :username, or :email, depending on which column is present, if none are present defaults to :login
|
26
32
|
# The name of the field used for logging in. Only specify if you aren't using any of the defaults.
|
27
33
|
#
|
@@ -181,7 +187,11 @@ module Authlogic
|
|
181
187
|
|
182
188
|
if options[:scope]
|
183
189
|
options[:login_field_validates_uniqueness_of_options][:scope] ||= options[:scope]
|
184
|
-
options[:
|
190
|
+
options[:email_field_validates_uniqueness_of_options][:scope] ||= options[:scope]
|
191
|
+
end
|
192
|
+
|
193
|
+
if options[:act_like_restful_authentication]
|
194
|
+
options[:crypto_provider] = CryptoProviders::Sha1
|
185
195
|
end
|
186
196
|
|
187
197
|
class_eval <<-"end_eval", __FILE__, __LINE__
|
@@ -41,8 +41,6 @@ module Authlogic
|
|
41
41
|
|
42
42
|
if options[:validate_password_field]
|
43
43
|
validates_presence_of options[:password_field], {:on => :create}.merge(options[:password_field_validates_presence_of_options])
|
44
|
-
|
45
|
-
|
46
44
|
validates_confirmation_of options[:password_field], options[:password_field_validates_confirmation_of_options].merge(:if => "#{options[:crypted_password_field]}_changed?".to_sym)
|
47
45
|
validates_presence_of "#{options[:password_field]}_confirmation", :if => "#{options[:crypted_password_field]}_changed?"
|
48
46
|
end
|
@@ -68,13 +66,13 @@ module Authlogic
|
|
68
66
|
return if pass.blank?
|
69
67
|
@#{options[:password_field]} = pass
|
70
68
|
self.#{options[:password_salt_field]} = self.class.unique_token
|
71
|
-
self.#{options[:crypted_password_field]} = #{options[:crypto_provider]}.encrypt(@#{options[:password_field]}
|
69
|
+
self.#{options[:crypted_password_field]} = #{options[:crypto_provider]}.encrypt(obfuscate_password(@#{options[:password_field]}))
|
72
70
|
end
|
73
71
|
|
74
72
|
def valid_#{options[:password_field]}?(attempted_password)
|
75
73
|
return false if attempted_password.blank? || #{options[:crypted_password_field]}.blank? || #{options[:password_salt_field]}.blank?
|
76
74
|
(#{options[:crypto_provider]}.respond_to?(:decrypt) && #{options[:crypto_provider]}.decrypt(#{options[:crypted_password_field]}) == attempted_password + #{options[:password_salt_field]}) ||
|
77
|
-
(!#{options[:crypto_provider]}.respond_to?(:decrypt) && #{options[:crypto_provider]}.encrypt(attempted_password
|
75
|
+
(!#{options[:crypto_provider]}.respond_to?(:decrypt) && #{options[:crypto_provider]}.encrypt(obfuscate_password(attempted_password)) == #{options[:crypted_password_field]})
|
78
76
|
end
|
79
77
|
|
80
78
|
def reset_#{options[:password_field]}
|
@@ -89,6 +87,15 @@ module Authlogic
|
|
89
87
|
save_without_session_maintenance(false)
|
90
88
|
end
|
91
89
|
alias_method :randomize_password!, :reset_password!
|
90
|
+
|
91
|
+
private
|
92
|
+
def obfuscate_password(raw_password)
|
93
|
+
if #{options[:act_like_restful_authentication].inspect}
|
94
|
+
[REST_AUTH_SITE_KEY, raw_password, #{options[:password_salt_field]}, REST_AUTH_SITE_KEY].join("--")
|
95
|
+
else
|
96
|
+
raw_password + #{options[:password_salt_field]}
|
97
|
+
end
|
98
|
+
end
|
92
99
|
end_eval
|
93
100
|
end
|
94
101
|
end
|
data/lib/authlogic/version.rb
CHANGED
data/test/orm_adapters_tests/active_record_adapter_tests/acts_as_authentic_tests/config_test.rb
CHANGED
@@ -13,35 +13,35 @@ module ORMAdaptersTests
|
|
13
13
|
def test_acts_as_authentic_config
|
14
14
|
default_config = {
|
15
15
|
:session_ids => [nil],
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
16
|
+
:email_field_validates_length_of_options => {},
|
17
|
+
:logged_in_timeout => 600,
|
18
|
+
:validate_password_field => true,
|
19
|
+
:login_field_validates_length_of_options => {},
|
20
|
+
:password_field_validation_options => {},
|
21
|
+
:login_field_type => :login,
|
22
|
+
:email_field_validates_format_of_options => {},
|
23
|
+
:crypted_password_field => :crypted_password,
|
24
|
+
:password_salt_field => :password_salt,
|
25
|
+
:login_field_validates_format_of_options => {},
|
26
|
+
:email_field_validation_options => {},
|
27
|
+
:crypto_provider => Authlogic::CryptoProviders::Sha512,
|
28
|
+
:persistence_token_field => :persistence_token,
|
29
|
+
:email_field_validates_uniqueness_of_options => {},
|
30
|
+
:session_class => "UserSession",
|
31
|
+
:single_access_token_field => :single_access_token,
|
32
|
+
:login_field_validates_uniqueness_of_options => {},
|
33
|
+
:validate_fields => true,
|
34
|
+
:login_field => :login,
|
35
|
+
:perishable_token_valid_for => 600,
|
36
|
+
:password_field_validates_presence_of_options => {},
|
37
|
+
:password_field => :password,
|
38
|
+
:validate_login_field => true,
|
39
|
+
:email_field => :email,
|
40
|
+
:perishable_token_field => :perishable_token,
|
41
|
+
:password_field_validates_confirmation_of_options => {},
|
42
|
+
:validate_email_field => true,
|
43
|
+
:validation_options => {},
|
44
|
+
:login_field_validation_options => {}
|
45
45
|
}
|
46
46
|
assert_equal default_config, User.acts_as_authentic_config
|
47
47
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authlogic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Johnson of Binary Logic
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-11-
|
12
|
+
date: 2008-11-22 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -43,6 +43,7 @@ extra_rdoc_files:
|
|
43
43
|
- lib/authlogic/controller_adapters/abstract_adapter.rb
|
44
44
|
- lib/authlogic/controller_adapters/merb_adapter.rb
|
45
45
|
- lib/authlogic/controller_adapters/rails_adapter.rb
|
46
|
+
- lib/authlogic/crypto_providers/bcrypt.rb
|
46
47
|
- lib/authlogic/crypto_providers/sha1.rb
|
47
48
|
- lib/authlogic/crypto_providers/sha512.rb
|
48
49
|
- lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/config.rb
|
@@ -74,6 +75,7 @@ files:
|
|
74
75
|
- lib/authlogic/controller_adapters/abstract_adapter.rb
|
75
76
|
- lib/authlogic/controller_adapters/merb_adapter.rb
|
76
77
|
- lib/authlogic/controller_adapters/rails_adapter.rb
|
78
|
+
- lib/authlogic/crypto_providers/bcrypt.rb
|
77
79
|
- lib/authlogic/crypto_providers/sha1.rb
|
78
80
|
- lib/authlogic/crypto_providers/sha512.rb
|
79
81
|
- lib/authlogic/orm_adapters/active_record_adapter/acts_as_authentic/config.rb
|