rodauth 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +5 -1
- data/README.rdoc +18 -15
- data/doc/login_password_requirements_base.rdoc +3 -0
- data/doc/release_notes/1.3.0.txt +21 -0
- data/lib/rodauth/features/login_password_requirements_base.rb +15 -3
- data/lib/rodauth/version.rb +1 -1
- data/spec/change_login_spec.rb +7 -0
- data/spec/migrate/001_tables.rb +12 -12
- data/spec/migrate_password/001_tables.rb +3 -3
- data/spec/migrate_travis/001_tables.rb +15 -15
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ee1b5d6f6b049a4fcd965ce0de9d2c15ce159e5
|
4
|
+
data.tar.gz: 14afd3681ed969ae8eb3edf3f35f66667df22d27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9de71675de5bf39eafd398479d4917bfe342e619f21c9fa3d7c26223c00591541ac8dc22f58358aa579dc02515e1648816153d4c2f5dc6098cbda208c774ae0
|
7
|
+
data.tar.gz: fd038a8458ac8a88f3ca6bec26c4642a10eabf130ba2e14bbefbbc45e5f2136e4edf59452ff8d6deb43ae08ff9e9f05f09ad75a4a73bb6500a88e82bfd0526eb
|
data/CHANGELOG
CHANGED
data/README.rdoc
CHANGED
@@ -227,6 +227,9 @@ or columns related to features that you don't need.
|
|
227
227
|
First migration. On PostgreSQL, this should be run with the +app+ account,
|
228
228
|
on MySQL and Microsoft SQL Server this should be run with the +ph+ account.
|
229
229
|
|
230
|
+
Note that these migrations require Sequel 4.35.0+. If you are using older
|
231
|
+
versions of Sequel, switch the :Bignum symbols to Bignum constants.
|
232
|
+
|
230
233
|
Sequel.migration do
|
231
234
|
up do
|
232
235
|
extension :date_arithmetic
|
@@ -240,7 +243,7 @@ on MySQL and Microsoft SQL Server this should be run with the +ph+ account.
|
|
240
243
|
|
241
244
|
db = self
|
242
245
|
create_table(:accounts) do
|
243
|
-
primary_key :id, :type
|
246
|
+
primary_key :id, :type=>:Bignum
|
244
247
|
foreign_key :status_id, :account_statuses, :null=>false, :default=>1
|
245
248
|
if db.database_type == :postgres
|
246
249
|
citext :email, :null=>false
|
@@ -262,45 +265,45 @@ on MySQL and Microsoft SQL Server this should be run with the +ph+ account.
|
|
262
265
|
|
263
266
|
# Used by the password reset feature
|
264
267
|
create_table(:account_password_reset_keys) do
|
265
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
268
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
266
269
|
String :key, :null=>false
|
267
270
|
DateTime :deadline, deadline_opts[1]
|
268
271
|
end
|
269
272
|
|
270
273
|
# Used by the account verification feature
|
271
274
|
create_table(:account_verification_keys) do
|
272
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
275
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
273
276
|
String :key, :null=>false
|
274
277
|
DateTime :requested_at, :null=>false, :default=>Sequel::CURRENT_TIMESTAMP
|
275
278
|
end
|
276
279
|
|
277
280
|
# Used by the remember me feature
|
278
281
|
create_table(:account_remember_keys) do
|
279
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
282
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
280
283
|
String :key, :null=>false
|
281
284
|
DateTime :deadline, deadline_opts[14]
|
282
285
|
end
|
283
286
|
|
284
287
|
# Used by the lockout feature
|
285
288
|
create_table(:account_login_failures) do
|
286
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
289
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
287
290
|
Integer :number, :null=>false, :default=>1
|
288
291
|
end
|
289
292
|
create_table(:account_lockouts) do
|
290
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
293
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
291
294
|
String :key, :null=>false
|
292
295
|
DateTime :deadline, deadline_opts[1]
|
293
296
|
end
|
294
297
|
|
295
298
|
# Used by the password expiration feature
|
296
299
|
create_table(:account_password_change_times) do
|
297
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
300
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
298
301
|
DateTime :changed_at, :null=>false, :default=>Sequel::CURRENT_TIMESTAMP
|
299
302
|
end
|
300
303
|
|
301
304
|
# Used by the account expiration feature
|
302
305
|
create_table(:account_activity_times) do
|
303
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
306
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
304
307
|
DateTime :last_activity_at, :null=>false
|
305
308
|
DateTime :last_login_at, :null=>false
|
306
309
|
DateTime :expired_at
|
@@ -308,13 +311,13 @@ on MySQL and Microsoft SQL Server this should be run with the +ph+ account.
|
|
308
311
|
|
309
312
|
# Used by the single session feature
|
310
313
|
create_table(:account_session_keys) do
|
311
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
314
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
312
315
|
String :key, :null=>false
|
313
316
|
end
|
314
317
|
|
315
318
|
# Used by the otp feature
|
316
319
|
create_table(:account_otp_keys) do
|
317
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
320
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
318
321
|
String :key, :null=>false
|
319
322
|
Integer :num_failures, :null=>false, :default=>0
|
320
323
|
Time :last_use, :null=>false, :default=>Sequel::CURRENT_TIMESTAMP
|
@@ -322,14 +325,14 @@ on MySQL and Microsoft SQL Server this should be run with the +ph+ account.
|
|
322
325
|
|
323
326
|
# Used by the recovery codes feature
|
324
327
|
create_table(:account_recovery_codes) do
|
325
|
-
foreign_key :id, :accounts, :type
|
328
|
+
foreign_key :id, :accounts, :type=>:Bignum
|
326
329
|
String :code
|
327
330
|
primary_key [:id, :code]
|
328
331
|
end
|
329
332
|
|
330
333
|
# Used by the sms codes feature
|
331
334
|
create_table(:account_sms_codes) do
|
332
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
335
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
333
336
|
String :phone_number, :null=>false
|
334
337
|
Integer :num_failures
|
335
338
|
String :code
|
@@ -386,7 +389,7 @@ Second migration, run using the +ph+ account:
|
|
386
389
|
Sequel.migration do
|
387
390
|
up do
|
388
391
|
create_table(:account_password_hashes) do
|
389
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
392
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
390
393
|
String :password_hash, :null=>false
|
391
394
|
end
|
392
395
|
Rodauth.create_database_authentication_functions(self)
|
@@ -416,8 +419,8 @@ Second migration, run using the +ph+ account:
|
|
416
419
|
|
417
420
|
# Used by the disallow_password_reuse feature
|
418
421
|
create_table(:account_previous_password_hashes) do
|
419
|
-
primary_key :id, :type
|
420
|
-
foreign_key :account_id, :accounts, :type
|
422
|
+
primary_key :id, :type=>:Bignum
|
423
|
+
foreign_key :account_id, :accounts, :type=>:Bignum
|
421
424
|
String :password_hash, :null=>false
|
422
425
|
end
|
423
426
|
Rodauth.create_database_previous_password_check_functions(self)
|
@@ -10,7 +10,10 @@ login_confirm_param :: The parameter name to use for login confirmations.
|
|
10
10
|
login_does_not_meet_requirements_message :: The error message to display when
|
11
11
|
the login does not meet the
|
12
12
|
requirements you have set.
|
13
|
+
login_maximum_length :: The maximum length for logins, 255 by default.
|
13
14
|
login_minimum_length :: The minimum length for logins, 3 by default.
|
15
|
+
login_too_long_message :: The error message fragment to show if the login is
|
16
|
+
too long.
|
14
17
|
login_too_short_message :: The error message fragment to show if the login is
|
15
18
|
too short.
|
16
19
|
logins_do_not_match_message :: The error message to display when login and
|
@@ -0,0 +1,21 @@
|
|
1
|
+
= New Features
|
2
|
+
|
3
|
+
* A login_maximum_length configuration method has been added. This
|
4
|
+
defaults to 255, and rodauth will now show an error message if a
|
5
|
+
user tries to create a login longer than this setting.
|
6
|
+
|
7
|
+
= Backwards Compatibility
|
8
|
+
|
9
|
+
* Rodauth's documentation and test code now use :Bignum instead of
|
10
|
+
Bignum for database-independent 64-bit integer types. This is
|
11
|
+
because using Bignum is now deprecated in Sequel as it will stop
|
12
|
+
working correctly in ruby 2.4+, due to the unification of Fixnum
|
13
|
+
and Bignum into Integer.
|
14
|
+
|
15
|
+
Rodauth's library code does not use either :Bignum or Bignum, but if
|
16
|
+
you are starting to use Rodauth and are copying the example
|
17
|
+
migration from Rodauth's documentation, or you are running the
|
18
|
+
migrations in Rodauth's tests, you now need to use Sequel 4.35.0+.
|
19
|
+
|
20
|
+
* Some files related to the hosting of the demo site on Heroku have
|
21
|
+
been removed from the repository.
|
@@ -4,6 +4,7 @@ module Rodauth
|
|
4
4
|
LoginPasswordRequirementsBase = Feature.define(:login_password_requirements_base) do
|
5
5
|
auth_value_method :login_confirm_param, 'login-confirm'
|
6
6
|
auth_value_method :login_minimum_length, 3
|
7
|
+
auth_value_method :login_maximum_length, 255
|
7
8
|
auth_value_method :logins_do_not_match_message, 'logins do not match'
|
8
9
|
auth_value_method :password_confirm_param, 'password-confirm'
|
9
10
|
auth_value_method :password_minimum_length, 6
|
@@ -16,6 +17,7 @@ module Rodauth
|
|
16
17
|
auth_value_methods(
|
17
18
|
:login_confirm_label,
|
18
19
|
:login_does_not_meet_requirements_message,
|
20
|
+
:login_too_long_message,
|
19
21
|
:login_too_short_message,
|
20
22
|
:password_confirm_label,
|
21
23
|
:password_does_not_meet_requirements_message,
|
@@ -79,14 +81,24 @@ module Rodauth
|
|
79
81
|
"invalid login#{", #{login_requirement_message}" if login_requirement_message}"
|
80
82
|
end
|
81
83
|
|
84
|
+
def login_too_long_message
|
85
|
+
"maximum #{login_maximum_length} characters"
|
86
|
+
end
|
87
|
+
|
82
88
|
def login_too_short_message
|
83
89
|
"minimum #{login_minimum_length} characters"
|
84
90
|
end
|
85
91
|
|
86
92
|
def login_meets_length_requirements?(login)
|
87
|
-
|
88
|
-
|
89
|
-
|
93
|
+
if login_minimum_length > login.length
|
94
|
+
@login_requirement_message = login_too_short_message
|
95
|
+
false
|
96
|
+
elsif login_maximum_length < login.length
|
97
|
+
@login_requirement_message = login_too_long_message
|
98
|
+
false
|
99
|
+
else
|
100
|
+
true
|
101
|
+
end
|
90
102
|
end
|
91
103
|
|
92
104
|
def login_meets_email_requirements?(login)
|
data/lib/rodauth/version.rb
CHANGED
data/spec/change_login_spec.rb
CHANGED
@@ -38,6 +38,13 @@ describe 'Rodauth change_login feature' do
|
|
38
38
|
page.html.must_include("invalid login, minimum 3 characters")
|
39
39
|
page.current_path.must_equal '/change-login'
|
40
40
|
|
41
|
+
fill_in 'Login', :with=>'f'*256
|
42
|
+
fill_in 'Confirm Login', :with=>'f'*256
|
43
|
+
click_button 'Change Login'
|
44
|
+
page.find('#error_flash').text.must_equal "There was an error changing your login"
|
45
|
+
page.html.must_include("invalid login, maximum 255 characters")
|
46
|
+
page.current_path.must_equal '/change-login'
|
47
|
+
|
41
48
|
fill_in 'Login', :with=>'foo@example.com'
|
42
49
|
fill_in 'Confirm Login', :with=>'foo2@example.com'
|
43
50
|
click_button 'Change Login'
|
data/spec/migrate/001_tables.rb
CHANGED
@@ -11,7 +11,7 @@ Sequel.migration do
|
|
11
11
|
|
12
12
|
db = self
|
13
13
|
create_table(:accounts) do
|
14
|
-
primary_key :id, :type
|
14
|
+
primary_key :id, :type=>:Bignum
|
15
15
|
foreign_key :status_id, :account_statuses, :null=>false, :default=>1
|
16
16
|
if db.database_type == :postgres
|
17
17
|
citext :email, :null=>false
|
@@ -33,45 +33,45 @@ Sequel.migration do
|
|
33
33
|
|
34
34
|
# Used by the password reset feature
|
35
35
|
create_table(:account_password_reset_keys) do
|
36
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
36
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
37
37
|
String :key, :null=>false
|
38
38
|
DateTime :deadline, deadline_opts[1]
|
39
39
|
end
|
40
40
|
|
41
41
|
# Used by the account verification feature
|
42
42
|
create_table(:account_verification_keys) do
|
43
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
43
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
44
44
|
String :key, :null=>false
|
45
45
|
DateTime :requested_at, :null=>false, :default=>Sequel::CURRENT_TIMESTAMP
|
46
46
|
end
|
47
47
|
|
48
48
|
# Used by the remember me feature
|
49
49
|
create_table(:account_remember_keys) do
|
50
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
50
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
51
51
|
String :key, :null=>false
|
52
52
|
DateTime :deadline, deadline_opts[14]
|
53
53
|
end
|
54
54
|
|
55
55
|
# Used by the lockout feature
|
56
56
|
create_table(:account_login_failures) do
|
57
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
57
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
58
58
|
Integer :number, :null=>false, :default=>1
|
59
59
|
end
|
60
60
|
create_table(:account_lockouts) do
|
61
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
61
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
62
62
|
String :key, :null=>false
|
63
63
|
DateTime :deadline, deadline_opts[1]
|
64
64
|
end
|
65
65
|
|
66
66
|
# Used by the password expiration feature
|
67
67
|
create_table(:account_password_change_times) do
|
68
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
68
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
69
69
|
DateTime :changed_at, :null=>false, :default=>Sequel::CURRENT_TIMESTAMP
|
70
70
|
end
|
71
71
|
|
72
72
|
# Used by the account expiration feature
|
73
73
|
create_table(:account_activity_times) do
|
74
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
74
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
75
75
|
DateTime :last_activity_at, :null=>false
|
76
76
|
DateTime :last_login_at, :null=>false
|
77
77
|
DateTime :expired_at
|
@@ -79,13 +79,13 @@ Sequel.migration do
|
|
79
79
|
|
80
80
|
# Used by the single session feature
|
81
81
|
create_table(:account_session_keys) do
|
82
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
82
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
83
83
|
String :key, :null=>false
|
84
84
|
end
|
85
85
|
|
86
86
|
# Used by the otp feature
|
87
87
|
create_table(:account_otp_keys) do
|
88
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
88
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
89
89
|
String :key, :null=>false
|
90
90
|
Integer :num_failures, :null=>false, :default=>0
|
91
91
|
Time :last_use, :null=>false, :default=>Sequel::CURRENT_TIMESTAMP
|
@@ -93,14 +93,14 @@ Sequel.migration do
|
|
93
93
|
|
94
94
|
# Used by the recovery codes feature
|
95
95
|
create_table(:account_recovery_codes) do
|
96
|
-
foreign_key :id, :accounts, :type
|
96
|
+
foreign_key :id, :accounts, :type=>:Bignum
|
97
97
|
String :code
|
98
98
|
primary_key [:id, :code]
|
99
99
|
end
|
100
100
|
|
101
101
|
# Used by the sms codes feature
|
102
102
|
create_table(:account_sms_codes) do
|
103
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
103
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
104
104
|
String :phone_number, :null=>false
|
105
105
|
Integer :num_failures
|
106
106
|
String :code
|
@@ -3,7 +3,7 @@ require 'rodauth/migrations'
|
|
3
3
|
Sequel.migration do
|
4
4
|
up do
|
5
5
|
create_table(:account_password_hashes) do
|
6
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
6
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
7
7
|
String :password_hash, :null=>false
|
8
8
|
end
|
9
9
|
Rodauth.create_database_authentication_functions(self)
|
@@ -33,8 +33,8 @@ Sequel.migration do
|
|
33
33
|
|
34
34
|
# Used by the disallow_password_reuse feature
|
35
35
|
create_table(:account_previous_password_hashes) do
|
36
|
-
primary_key :id, :type
|
37
|
-
foreign_key :account_id, :accounts, :type
|
36
|
+
primary_key :id, :type=>:Bignum
|
37
|
+
foreign_key :account_id, :accounts, :type=>:Bignum
|
38
38
|
String :password_hash, :null=>false
|
39
39
|
end
|
40
40
|
Rodauth.create_database_previous_password_check_functions(self)
|
@@ -12,7 +12,7 @@ Sequel.migration do
|
|
12
12
|
|
13
13
|
db = self
|
14
14
|
create_table(:accounts) do
|
15
|
-
primary_key :id, :type
|
15
|
+
primary_key :id, :type=>:Bignum
|
16
16
|
foreign_key :status_id, :account_statuses, :null=>false, :default=>1
|
17
17
|
if db.database_type == :postgres
|
18
18
|
citext :email, :null=>false
|
@@ -27,7 +27,7 @@ Sequel.migration do
|
|
27
27
|
end
|
28
28
|
|
29
29
|
create_table(:account_password_hashes) do
|
30
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
30
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
31
31
|
String :password_hash, :null=>false
|
32
32
|
end
|
33
33
|
Rodauth.create_database_authentication_functions(self)
|
@@ -41,65 +41,65 @@ Sequel.migration do
|
|
41
41
|
end
|
42
42
|
|
43
43
|
create_table(:account_password_reset_keys) do
|
44
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
44
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
45
45
|
String :key, :null=>false
|
46
46
|
DateTime :deadline, deadline_opts[1]
|
47
47
|
end
|
48
48
|
|
49
49
|
create_table(:account_verification_keys) do
|
50
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
50
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
51
51
|
String :key, :null=>false
|
52
52
|
DateTime :requested_at, :null=>false, :default=>Sequel::CURRENT_TIMESTAMP
|
53
53
|
end
|
54
54
|
|
55
55
|
create_table(:account_remember_keys) do
|
56
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
56
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
57
57
|
String :key, :null=>false
|
58
58
|
DateTime :deadline, deadline_opts[14]
|
59
59
|
end
|
60
60
|
|
61
61
|
create_table(:account_login_failures) do
|
62
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
62
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
63
63
|
Integer :number, :null=>false, :default=>1
|
64
64
|
end
|
65
65
|
create_table(:account_lockouts) do
|
66
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
66
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
67
67
|
String :key, :null=>false
|
68
68
|
DateTime :deadline, deadline_opts[1]
|
69
69
|
end
|
70
70
|
|
71
71
|
create_table(:account_password_change_times) do
|
72
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
72
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
73
73
|
DateTime :changed_at, :null=>false, :default=>Sequel::CURRENT_TIMESTAMP
|
74
74
|
end
|
75
75
|
|
76
76
|
create_table(:account_activity_times) do
|
77
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
77
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
78
78
|
DateTime :last_activity_at, :null=>false
|
79
79
|
DateTime :last_login_at, :null=>false
|
80
80
|
DateTime :expired_at
|
81
81
|
end
|
82
82
|
|
83
83
|
create_table(:account_session_keys) do
|
84
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
84
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
85
85
|
String :key, :null=>false
|
86
86
|
end
|
87
87
|
|
88
88
|
create_table(:account_otp_keys) do
|
89
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
89
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
90
90
|
String :key, :null=>false
|
91
91
|
Integer :num_failures, :null=>false, :default=>0
|
92
92
|
Time :last_use, :null=>false, :default=>Sequel::CURRENT_TIMESTAMP
|
93
93
|
end
|
94
94
|
|
95
95
|
create_table(:account_recovery_codes) do
|
96
|
-
foreign_key :id, :accounts, :type
|
96
|
+
foreign_key :id, :accounts, :type=>:Bignum
|
97
97
|
String :code
|
98
98
|
primary_key [:id, :code]
|
99
99
|
end
|
100
100
|
|
101
101
|
create_table(:account_sms_codes) do
|
102
|
-
foreign_key :id, :accounts, :primary_key=>true, :type
|
102
|
+
foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum
|
103
103
|
String :phone_number, :null=>false
|
104
104
|
Integer :num_failures
|
105
105
|
String :code
|
@@ -107,8 +107,8 @@ Sequel.migration do
|
|
107
107
|
end
|
108
108
|
|
109
109
|
create_table(:account_previous_password_hashes) do
|
110
|
-
primary_key :id, :type
|
111
|
-
foreign_key :account_id, :accounts, :type
|
110
|
+
primary_key :id, :type=>:Bignum
|
111
|
+
foreign_key :account_id, :accounts, :type=>:Bignum
|
112
112
|
String :password_hash, :null=>false
|
113
113
|
end
|
114
114
|
Rodauth.create_database_previous_password_check_functions(self)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rodauth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Evans
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sequel
|
@@ -227,6 +227,7 @@ extra_rdoc_files:
|
|
227
227
|
- doc/release_notes/1.0.0.txt
|
228
228
|
- doc/release_notes/1.1.0.txt
|
229
229
|
- doc/release_notes/1.2.0.txt
|
230
|
+
- doc/release_notes/1.3.0.txt
|
230
231
|
files:
|
231
232
|
- CHANGELOG
|
232
233
|
- MIT-LICENSE
|
@@ -254,6 +255,7 @@ files:
|
|
254
255
|
- doc/release_notes/1.0.0.txt
|
255
256
|
- doc/release_notes/1.1.0.txt
|
256
257
|
- doc/release_notes/1.2.0.txt
|
258
|
+
- doc/release_notes/1.3.0.txt
|
257
259
|
- doc/remember.rdoc
|
258
260
|
- doc/reset_password.rdoc
|
259
261
|
- doc/session_expiration.rdoc
|
@@ -378,7 +380,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
378
380
|
requirements:
|
379
381
|
- - ">="
|
380
382
|
- !ruby/object:Gem::Version
|
381
|
-
version:
|
383
|
+
version: 1.8.7
|
382
384
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
383
385
|
requirements:
|
384
386
|
- - ">="
|