authlogic 4.5.0 → 6.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +4 -4
  2. data/lib/authlogic/acts_as_authentic/base.rb +19 -19
  3. data/lib/authlogic/acts_as_authentic/email.rb +3 -170
  4. data/lib/authlogic/acts_as_authentic/logged_in_status.rb +3 -1
  5. data/lib/authlogic/acts_as_authentic/login.rb +7 -174
  6. data/lib/authlogic/acts_as_authentic/magic_columns.rb +7 -4
  7. data/lib/authlogic/acts_as_authentic/password.rb +67 -256
  8. data/lib/authlogic/acts_as_authentic/perishable_token.rb +8 -5
  9. data/lib/authlogic/acts_as_authentic/persistence_token.rb +10 -4
  10. data/lib/authlogic/acts_as_authentic/queries/case_sensitivity.rb +53 -0
  11. data/lib/authlogic/acts_as_authentic/queries/find_with_case.rb +36 -20
  12. data/lib/authlogic/acts_as_authentic/session_maintenance.rb +12 -8
  13. data/lib/authlogic/acts_as_authentic/single_access_token.rb +10 -8
  14. data/lib/authlogic/config.rb +9 -1
  15. data/lib/authlogic/controller_adapters/abstract_adapter.rb +28 -4
  16. data/lib/authlogic/controller_adapters/rack_adapter.rb +2 -0
  17. data/lib/authlogic/controller_adapters/rails_adapter.rb +7 -30
  18. data/lib/authlogic/controller_adapters/sinatra_adapter.rb +6 -0
  19. data/lib/authlogic/cookie_credentials.rb +63 -0
  20. data/lib/authlogic/crypto_providers/bcrypt.rb +3 -3
  21. data/lib/authlogic/crypto_providers/md5/v2.rb +35 -0
  22. data/lib/authlogic/crypto_providers/md5.rb +6 -6
  23. data/lib/authlogic/crypto_providers/scrypt.rb +2 -0
  24. data/lib/authlogic/crypto_providers/sha1/v2.rb +41 -0
  25. data/lib/authlogic/crypto_providers/sha1.rb +7 -6
  26. data/lib/authlogic/crypto_providers/sha256/v2.rb +58 -0
  27. data/lib/authlogic/crypto_providers/sha256.rb +5 -0
  28. data/lib/authlogic/crypto_providers/sha512/v2.rb +39 -0
  29. data/lib/authlogic/crypto_providers/sha512.rb +9 -5
  30. data/lib/authlogic/crypto_providers.rb +5 -20
  31. data/lib/authlogic/errors.rb +50 -0
  32. data/lib/authlogic/i18n/translator.rb +4 -1
  33. data/lib/authlogic/i18n.rb +3 -1
  34. data/lib/authlogic/random.rb +2 -0
  35. data/lib/authlogic/session/base.rb +2197 -39
  36. data/lib/authlogic/session/magic_column/assigns_last_request_at.rb +46 -0
  37. data/lib/authlogic/test_case/mock_api_controller.rb +52 -0
  38. data/lib/authlogic/test_case/mock_controller.rb +3 -1
  39. data/lib/authlogic/test_case/mock_cookie_jar.rb +32 -6
  40. data/lib/authlogic/test_case/mock_logger.rb +2 -0
  41. data/lib/authlogic/test_case/mock_request.rb +12 -0
  42. data/lib/authlogic/test_case/rails_request_adapter.rb +9 -1
  43. data/lib/authlogic/test_case.rb +5 -0
  44. data/lib/authlogic/version.rb +2 -1
  45. data/lib/authlogic.rb +5 -28
  46. metadata +175 -200
  47. data/.github/ISSUE_TEMPLATE/bug_report.md +0 -28
  48. data/.github/ISSUE_TEMPLATE/feature_proposal.md +0 -32
  49. data/.github/triage.md +0 -86
  50. data/.gitignore +0 -15
  51. data/.rubocop.yml +0 -133
  52. data/.rubocop_todo.yml +0 -74
  53. data/.travis.yml +0 -24
  54. data/CHANGELOG.md +0 -348
  55. data/CONTRIBUTING.md +0 -91
  56. data/Gemfile +0 -6
  57. data/LICENSE +0 -20
  58. data/README.md +0 -448
  59. data/Rakefile +0 -21
  60. data/UPGRADING.md +0 -22
  61. data/authlogic.gemspec +0 -40
  62. data/doc/use_normal_rails_validation.md +0 -82
  63. data/gemfiles/Gemfile.rails-4.2.x +0 -6
  64. data/gemfiles/Gemfile.rails-5.1.x +0 -6
  65. data/gemfiles/Gemfile.rails-5.2.x +0 -6
  66. data/lib/authlogic/acts_as_authentic/restful_authentication.rb +0 -106
  67. data/lib/authlogic/acts_as_authentic/validations_scope.rb +0 -35
  68. data/lib/authlogic/authenticates_many/association.rb +0 -50
  69. data/lib/authlogic/authenticates_many/base.rb +0 -81
  70. data/lib/authlogic/crypto_providers/aes256.rb +0 -71
  71. data/lib/authlogic/crypto_providers/wordpress.rb +0 -72
  72. data/lib/authlogic/regex.rb +0 -79
  73. data/lib/authlogic/session/activation.rb +0 -73
  74. data/lib/authlogic/session/active_record_trickery.rb +0 -65
  75. data/lib/authlogic/session/brute_force_protection.rb +0 -127
  76. data/lib/authlogic/session/callbacks.rb +0 -153
  77. data/lib/authlogic/session/cookies.rb +0 -329
  78. data/lib/authlogic/session/existence.rb +0 -103
  79. data/lib/authlogic/session/foundation.rb +0 -105
  80. data/lib/authlogic/session/http_auth.rb +0 -107
  81. data/lib/authlogic/session/id.rb +0 -53
  82. data/lib/authlogic/session/klass.rb +0 -73
  83. data/lib/authlogic/session/magic_columns.rb +0 -119
  84. data/lib/authlogic/session/magic_states.rb +0 -82
  85. data/lib/authlogic/session/params.rb +0 -130
  86. data/lib/authlogic/session/password.rb +0 -318
  87. data/lib/authlogic/session/perishable_token.rb +0 -24
  88. data/lib/authlogic/session/persistence.rb +0 -77
  89. data/lib/authlogic/session/priority_record.rb +0 -38
  90. data/lib/authlogic/session/scopes.rb +0 -138
  91. data/lib/authlogic/session/session.rb +0 -77
  92. data/lib/authlogic/session/timeout.rb +0 -103
  93. data/lib/authlogic/session/unauthorized_record.rb +0 -56
  94. data/lib/authlogic/session/validation.rb +0 -93
  95. data/test/acts_as_authentic_test/base_test.rb +0 -27
  96. data/test/acts_as_authentic_test/email_test.rb +0 -241
  97. data/test/acts_as_authentic_test/logged_in_status_test.rb +0 -64
  98. data/test/acts_as_authentic_test/login_test.rb +0 -153
  99. data/test/acts_as_authentic_test/magic_columns_test.rb +0 -29
  100. data/test/acts_as_authentic_test/password_test.rb +0 -263
  101. data/test/acts_as_authentic_test/perishable_token_test.rb +0 -98
  102. data/test/acts_as_authentic_test/persistence_token_test.rb +0 -62
  103. data/test/acts_as_authentic_test/restful_authentication_test.rb +0 -48
  104. data/test/acts_as_authentic_test/session_maintenance_test.rb +0 -150
  105. data/test/acts_as_authentic_test/single_access_test.rb +0 -46
  106. data/test/adapter_test.rb +0 -23
  107. data/test/authenticates_many_test.rb +0 -33
  108. data/test/config_test.rb +0 -38
  109. data/test/crypto_provider_test/aes256_test.rb +0 -16
  110. data/test/crypto_provider_test/bcrypt_test.rb +0 -16
  111. data/test/crypto_provider_test/scrypt_test.rb +0 -16
  112. data/test/crypto_provider_test/sha1_test.rb +0 -25
  113. data/test/crypto_provider_test/sha256_test.rb +0 -16
  114. data/test/crypto_provider_test/sha512_test.rb +0 -16
  115. data/test/crypto_provider_test/wordpress_test.rb +0 -26
  116. data/test/fixtures/companies.yml +0 -5
  117. data/test/fixtures/employees.yml +0 -17
  118. data/test/fixtures/projects.yml +0 -3
  119. data/test/fixtures/users.yml +0 -41
  120. data/test/i18n/lol.yml +0 -4
  121. data/test/i18n_test.rb +0 -35
  122. data/test/libs/affiliate.rb +0 -9
  123. data/test/libs/company.rb +0 -8
  124. data/test/libs/employee.rb +0 -9
  125. data/test/libs/employee_session.rb +0 -4
  126. data/test/libs/ldaper.rb +0 -5
  127. data/test/libs/project.rb +0 -5
  128. data/test/libs/user.rb +0 -9
  129. data/test/libs/user_session.rb +0 -27
  130. data/test/random_test.rb +0 -15
  131. data/test/session_test/activation_test.rb +0 -45
  132. data/test/session_test/active_record_trickery_test.rb +0 -78
  133. data/test/session_test/brute_force_protection_test.rb +0 -110
  134. data/test/session_test/callbacks_test.rb +0 -42
  135. data/test/session_test/cookies_test.rb +0 -244
  136. data/test/session_test/credentials_test.rb +0 -0
  137. data/test/session_test/existence_test.rb +0 -88
  138. data/test/session_test/foundation_test.rb +0 -24
  139. data/test/session_test/http_auth_test.rb +0 -60
  140. data/test/session_test/id_test.rb +0 -19
  141. data/test/session_test/klass_test.rb +0 -42
  142. data/test/session_test/magic_columns_test.rb +0 -62
  143. data/test/session_test/magic_states_test.rb +0 -60
  144. data/test/session_test/params_test.rb +0 -61
  145. data/test/session_test/password_test.rb +0 -107
  146. data/test/session_test/perishability_test.rb +0 -17
  147. data/test/session_test/persistence_test.rb +0 -35
  148. data/test/session_test/scopes_test.rb +0 -68
  149. data/test/session_test/session_test.rb +0 -80
  150. data/test/session_test/timeout_test.rb +0 -84
  151. data/test/session_test/unauthorized_record_test.rb +0 -15
  152. data/test/session_test/validation_test.rb +0 -25
  153. data/test/test_helper.rb +0 -272
data/.rubocop.yml DELETED
@@ -1,133 +0,0 @@
1
- inherit_from: .rubocop_todo.yml
2
-
3
- AllCops:
4
- Exclude:
5
- # TravisCI runs `bundle install --path=${BUNDLE_PATH:-vendor/bundle}`
6
- # causing our bundle to be installed in `gemfiles/vendor/bundle`.
7
- # Regardless, we have no interest in linting files in our bundle :D
8
- - gemfiles/vendor/bundle/**/*
9
- # Specify lowest supported ruby version. If we committed our .ruby-version
10
- # file, we wouldn't have to specify this (https://bit.ly/2vNTsue), but we
11
- # don't commit that file because that would interfere with testing multiple
12
- # rubies on CI.
13
- TargetRubyVersion: 2.3
14
-
15
- # Please use normal indentation when aligning parameters.
16
- #
17
- # Good:
18
- #
19
- # method_call(
20
- # a,
21
- # b
22
- # )
23
- #
24
- # method_call(a,
25
- # b
26
- # )
27
- #
28
- # Bad:
29
- #
30
- # method_call(a,
31
- # b)
32
- #
33
- # The latter is harder to maintain and uses too much horizontal space.
34
- Layout/AlignParameters:
35
- EnforcedStyle: with_fixed_indentation
36
-
37
- Layout/MultilineMethodCallIndentation:
38
- EnforcedStyle: indented
39
-
40
- Layout/MultilineOperationIndentation:
41
- EnforcedStyle: indented
42
-
43
- Metrics/AbcSize:
44
- Exclude:
45
- # crypto_providers/wordpress is deprecated so we will not attempt to
46
- # improve its quality.
47
- - lib/authlogic/crypto_providers/wordpress.rb
48
- # In an ideal world tests would be held to the same ABC metric as production
49
- # code. In practice, time spent doing so is not nearly as valuable as
50
- # spending the same time improving production code.
51
- - test/**/*
52
-
53
- # Questionable value compared to metrics like AbcSize or CyclomaticComplexity.
54
- Metrics/BlockLength:
55
- Enabled: false
56
-
57
- # Questionable value compared to metrics like AbcSize or CyclomaticComplexity.
58
- Metrics/ClassLength:
59
- Enabled: false
60
-
61
- Metrics/CyclomaticComplexity:
62
- Exclude:
63
- # crypto_providers/wordpress is deprecated so we will not attempt to
64
- # improve its quality.
65
- - lib/authlogic/crypto_providers/wordpress.rb
66
-
67
- # Aim for 80, but 100 is OK.
68
- Metrics/LineLength:
69
- Max: 100
70
-
71
- # Questionable value compared to metrics like AbcSize or CyclomaticComplexity.
72
- Metrics/MethodLength:
73
- Enabled: false
74
-
75
- # Questionable value compared to metrics like AbcSize or CyclomaticComplexity.
76
- Metrics/ModuleLength:
77
- Enabled: false
78
-
79
- # Sometimes prefixing a method name with get_ or set_ is a reasonable choice.
80
- Naming/AccessorMethodName:
81
- Enabled: false
82
-
83
- # Having a consistent delimiter, like EOS, improves reading speed. The delimiter
84
- # is syntactic noise, just like a quotation mark, and inconsistent naming would
85
- # hurt reading speed, just as inconsistent quoting would.
86
- Naming/HeredocDelimiterNaming:
87
- Enabled: false
88
-
89
- # Avoid single-line method definitions.
90
- Style/EmptyMethod:
91
- EnforcedStyle: expanded
92
-
93
- # Avoid annotated tokens except in desperately complicated format strings.
94
- # In 99% of format strings they actually make it less readable.
95
- Style/FormatStringToken:
96
- Enabled: false
97
-
98
- # Too subtle to lint. Guard clauses are great, use them if they help.
99
- Style/GuardClause:
100
- Enabled: false
101
-
102
- # Too subtle to lint. A multi-line conditional may improve readability, even if
103
- # a postfix conditional would satisfy `Metrics/LineLength`.
104
- Style/IfUnlessModifier:
105
- Enabled: false
106
-
107
- # Too subtle to lint. Use semantic style, but prefer `}.x` over `end.x`.
108
- Style/BlockDelimiters:
109
- Enabled: false
110
-
111
- # Use the nested style because it is safer. It is easier to make mistakes with
112
- # the compact style.
113
- Style/ClassAndModuleChildren:
114
- EnforcedStyle: nested
115
-
116
- # Both `module_function` and `extend_self` are legitimate. Most importantly,
117
- # they are different (http://bit.ly/2hSQAGm)
118
- Style/ModuleFunction:
119
- Enabled: false
120
-
121
- # The decision of when to use slashes `/foo/` or percent-r `%r{foo}` is too
122
- # subtle to lint. Use whichever requires fewer backslash escapes.
123
- Style/RegexpLiteral:
124
- AllowInnerSlashes: true
125
-
126
- # We use words, like `$LOAD_PATH`, because they are much less confusing that
127
- # arcane symbols like `$:`. Unfortunately, we must then `require "English"` in
128
- # a few places, but it's worth it so that we can read our code.
129
- Style/SpecialGlobalVars:
130
- EnforcedStyle: use_english_names
131
-
132
- Style/StringLiterals:
133
- EnforcedStyle: double_quotes
data/.rubocop_todo.yml DELETED
@@ -1,74 +0,0 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2018-05-22 23:50:03 -0400 using RuboCop version 0.56.0.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
8
-
9
- # Offense count: 10
10
- Metrics/AbcSize:
11
- Max: 18.5
12
-
13
- # Offense count: 59
14
- # Cop supports --auto-correct.
15
- # Configuration parameters: EnforcedStyle.
16
- # SupportedStyles: prefer_alias, prefer_alias_method
17
- Style/Alias:
18
- Enabled: false
19
-
20
- # Offense count: 5
21
- Style/ClassVars:
22
- Exclude:
23
- - 'lib/authlogic/i18n.rb'
24
-
25
- # Offense count: 22
26
- Style/Documentation:
27
- Exclude:
28
- # Permanent
29
- - 'test/**/*'
30
-
31
- # TODO
32
- - 'lib/authlogic/config.rb'
33
- - 'lib/authlogic/controller_adapters/sinatra_adapter.rb'
34
- - 'lib/authlogic/crypto_providers.rb'
35
- - 'lib/authlogic/i18n/translator.rb'
36
- - 'lib/authlogic/session/activation.rb'
37
- - 'lib/authlogic/session/active_record_trickery.rb'
38
- - 'lib/authlogic/session/existence.rb'
39
- - 'lib/authlogic/session/foundation.rb'
40
- - 'lib/authlogic/session/klass.rb'
41
- - 'lib/authlogic/session/persistence.rb'
42
- - 'lib/authlogic/session/scopes.rb'
43
- - 'lib/authlogic/test_case.rb'
44
- - 'lib/authlogic/test_case/mock_cookie_jar.rb'
45
- - 'lib/authlogic/version.rb'
46
-
47
- Style/FrozenStringLiteralComment:
48
- Exclude:
49
- # Freezing strings in lib would be a breaking change. We'll have to wait
50
- # for the next major version.
51
- - lib/**/*
52
-
53
- # Offense count: 4
54
- Style/MethodMissingSuper:
55
- Exclude:
56
- - 'lib/authlogic/controller_adapters/abstract_adapter.rb'
57
- - 'lib/authlogic/controller_adapters/sinatra_adapter.rb'
58
- - 'lib/authlogic/test_case/mock_request.rb'
59
-
60
- # Offense count: 3
61
- Style/MissingRespondToMissing:
62
- Exclude:
63
- - 'lib/authlogic/controller_adapters/sinatra_adapter.rb'
64
- - 'lib/authlogic/test_case/mock_request.rb'
65
-
66
- Style/NumericPredicate:
67
- Enabled: false
68
-
69
- # Offense count: 10
70
- # Cop supports --auto-correct.
71
- # Configuration parameters: .
72
- # SupportedStyles: compact, exploded
73
- Style/RaiseArgs:
74
- EnforcedStyle: compact
data/.travis.yml DELETED
@@ -1,24 +0,0 @@
1
- language: ruby
2
- cache: bundler
3
-
4
- before_install:
5
- - gem update --system
6
- - gem update bundler
7
-
8
- # We only test the oldest and the newest ruby versions that we support. We
9
- # do not test intermediate versions.
10
- rvm:
11
- - 2.3.7
12
- - 2.5.1
13
-
14
- # We only test living versions of rails, per the [rails maintenance
15
- # policy](http://guides.rubyonrails.org/maintenance_policy.html)
16
- gemfile:
17
- - gemfiles/Gemfile.rails-4.2.x
18
- - gemfiles/Gemfile.rails-5.1.x
19
- - gemfiles/Gemfile.rails-5.2.x
20
-
21
- matrix:
22
- fast_finish: true
23
-
24
- sudo: false
data/CHANGELOG.md DELETED
@@ -1,348 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
- and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
-
8
- ## 5.0.0
9
-
10
- See https://github.com/binarylogic/authlogic/blob/5-0-stable/CHANGELOG.md
11
-
12
- ## Unreleased
13
-
14
- * Breaking Changes
15
- * None
16
- * Added
17
- * None
18
- * Fixed
19
- * None
20
-
21
- ## 4.5.0 (2020-03-23)
22
-
23
- * Breaking Changes
24
- * None
25
- * Added
26
- * [#701](https://github.com/binarylogic/authlogic/pull/701) - Ability to
27
- specify None as a valid value to SameSite cookie attribute
28
- * Fixed
29
- * None
30
-
31
- ## 4.4.3 (2019-03-23)
32
-
33
- * Breaking Changes
34
- * None
35
- * Added
36
- * [#660](https://github.com/binarylogic/authlogic/pull/660) -
37
- Authlogic::Session::Cookies.encrypt_cookie option
38
- * Fixed
39
- * Restrict sqlite3 version so tests can run normally
40
-
41
- ## 4.4.2 (2018-09-23)
42
-
43
- * Breaking Changes
44
- * None
45
- * Added
46
- * None
47
- * Fixed
48
- * Improved instructions in deprecation warning for validations
49
-
50
- ## 4.4.1 (2018-09-21)
51
-
52
- * Breaking Changes
53
- * None
54
- * Added
55
- * None
56
- * Fixed
57
- * The methods for disabling Authlogic's "special" validations,
58
- eg. `validate_email_field = false` are actually deprecated, but should
59
- not produce a deprecation warning.
60
- * Only produce deprecation warning when configuring a validation, not when
61
- performing actual validation.
62
-
63
- ## 4.4.0 (2018-09-21)
64
-
65
- * Breaking Changes
66
- * None
67
- * Added
68
- * None
69
- * Fixed
70
- * None
71
- * Deprecation
72
- * [#627](https://github.com/binarylogic/authlogic/pull/627) -
73
- Deprecate `authenticates_many` without replacement
74
- * [#623](https://github.com/binarylogic/authlogic/pull/623) -
75
- Deprecate unnecessary validation features, use normal rails validation
76
- instead
77
-
78
- ## 4.3.0 (2018-08-12)
79
-
80
- * Breaking Changes
81
- * None
82
- * Added
83
- * None
84
- * Fixed
85
- * None
86
- * Dependencies
87
- * Drop support for ruby 2.2, which reached EoL on 2018-06-20
88
-
89
- ## 4.2.0 (2018-07-18)
90
-
91
- * Breaking Changes
92
- * None
93
- * Added
94
- * [#611](https://github.com/binarylogic/authlogic/pull/611) - Deprecate
95
- AES256, guide users to choose a better crypto provider
96
- * Fixed
97
- * None
98
-
99
- ## 4.1.1 (2018-05-23)
100
-
101
- * Breaking Changes
102
- * None
103
- * Added
104
- * None
105
- * Fixed
106
- * [#606](https://github.com/binarylogic/authlogic/pull/606) - Interpreter
107
- warnings about undefined instance variables
108
-
109
- ## 4.1.0 (2018-04-24)
110
-
111
- * Breaking Changes
112
- * None
113
- * Added
114
- * None
115
- * Fixed
116
- * None
117
- * Deprecated
118
- * crypto_providers/wordpress.rb, without replacement
119
- * restful_authentication, without replacement
120
-
121
- ## 4.0.1 (2018-03-20)
122
-
123
- * Breaking Changes
124
- * None
125
- * Added
126
- * None
127
- * Fixed
128
- * [#590](https://github.com/binarylogic/authlogic/pull/590) -
129
- Fix "cannot modify frozen gem" re: ActiveRecord.gem_version
130
-
131
- ## 4.0.0 (2018-03-18)
132
-
133
- * Breaking Changes, Major
134
- * Drop support for ruby < 2.2
135
- * Drop support for rails < 4.2
136
- * HTTP Basic Auth is now disabled by default (use allow_http_basic_auth to enable)
137
- * 'httponly' and 'secure' cookie options are enabled by default now
138
- * maintain_sessions config has been removed. It has been split into 2 new options:
139
- log_in_after_create & log_in_after_password_change (@lucasminissale)
140
- * [#558](https://github.com/binarylogic/authlogic/pull/558) Passing an
141
- ActionController::Parameters into authlogic will now raise an error
142
-
143
- * Breaking Changes, Minor
144
- * Methods in Authlogic::Random are now module methods, and are no longer
145
- instance methods. Previously, there were both. Do not use Authlogic::Random
146
- as a mixin.
147
- * Our mutable constants (e.g. arrays, hashes) are now frozen.
148
-
149
- * Added
150
- * `Authlogic.gem_version`
151
- * [#586](https://github.com/binarylogic/authlogic/pull/586) Support for SameSite cookies
152
- * [#581](https://github.com/binarylogic/authlogic/pull/581) Support for rails 5.2
153
- * Support for ruby 2.4, specifically openssl gem 2.0
154
- * [#98](https://github.com/binarylogic/authlogic/issues/98)
155
- I18n for invalid session error message. (@eugenebolshakov)
156
-
157
- * Fixed
158
- * Random.friendly_token (used for e.g. perishable token) now returns strings
159
- of consistent length, and conforms better to RFC-4648
160
- * ensure that login field validation uses correct locale (@sskirby)
161
- * add a respond_to_missing? in AbstractAdapter that also checks controller respond_to?
162
- * [#561](https://github.com/binarylogic/authlogic/issues/561) authenticates_many now works with scope_cookies:true
163
- * Allow tld up to 24 characters per https://data.iana.org/TLD/tlds-alpha-by-domain.txt
164
-
165
- ## 3.8.0 2018-02-07
166
-
167
- * Breaking Changes
168
- * None
169
-
170
- * Added
171
- * [#582](https://github.com/binarylogic/authlogic/pull/582) Support rails 5.2
172
- * [#583](https://github.com/binarylogic/authlogic/pull/583) Support openssl gem 2.0
173
-
174
- * Fixed
175
- * None
176
-
177
- ## 3.7.0 2018-02-07
178
-
179
- * Breaking Changes
180
- * None
181
-
182
- * Added
183
- * [#580](https://github.com/binarylogic/authlogic/pull/580) Deprecated
184
- `ActionController::Parameters`, will be removed in 4.0.0
185
-
186
- * Fixed
187
- * None
188
-
189
- ## 3.6.1 2017-09-30
190
-
191
- * Breaking Changes
192
- * None
193
-
194
- * Added
195
- * None
196
-
197
- * Fixed
198
- * Allow TLD up to 24 characters per
199
- https://data.iana.org/TLD/tlds-alpha-by-domain.txt
200
- * [#561](https://github.com/binarylogic/authlogic/issues/561)
201
- authenticates_many now works with scope_cookies:true
202
-
203
- ## 3.6.0 2017-04-28
204
-
205
- * Breaking Changes
206
- * None
207
-
208
- * Added
209
- * Support rails 5.1
210
-
211
- * Fixed
212
- * ensure that login field validation uses correct locale (@sskirby)
213
-
214
- ## 3.5.0 2016-08-29
215
-
216
- * new
217
- * Rails 5.0 support! Thanks to all reporters and contributors.
218
-
219
- * changes
220
- * increased default minimum password length to 8 (@iainbeeston)
221
- * bind parameters in where statement for rails 5 support
222
- * change callback for rails 5 support
223
- * converts the ActionController::Parameters to a Hash for rails 5 support
224
- * check last_request_at_threshold even if last_request_at_update_allowed returns true (@rofreg)
225
-
226
- ## 3.4.6 2015
227
-
228
- * changes
229
- * add Regex.email_nonascii for validation of emails w/unicode (@rchekaluk)
230
- * allow scrypt 2.x (@jaredbeck)
231
-
232
- ## 3.4.5 2015-03-01
233
-
234
- * changes
235
- * security-hardening fix and cleanup in persistence_token lookup
236
- * security-hardening fix in perishable_token lookup (thx @tomekr)
237
-
238
- ## 3.4.4 2014-12-23
239
-
240
- * changes
241
- * extract rw_config into an Authlogic::Config module
242
- * improved the way config changes are made in tests
243
- * fix for Rails 4.2 by extending ActiveModel
244
-
245
- ## 3.4.3 2014-10-08
246
-
247
- * changes
248
- * backfill CHANGELOG
249
- * better compatibility with jruby (thx @petergoldstein)
250
- * added scrypt as a dependency
251
- * cleanup some code (thx @roryokane)
252
- * reference 'bcrypt' gem instead of 'bcrypt-ruby' (thx @roryokane)
253
- * fixed typo (thx @chamini2)
254
- * fixed magic column validations for Rails 4.2 (thx @tom-kuca)
255
-
256
- ## 3.4.2 2014-04-28
257
-
258
- * changes
259
- * fixed the missing scrypt/bcrypt gem errors introduced in 3.4.1
260
- * implemented autoloading for providers
261
- * added longer subdomain support in email regex
262
-
263
- ## 3.4.1 2014-04-04
264
-
265
- * changes
266
- * undid an accidental revert of some code
267
-
268
- ## 3.4.0 2014-03-03
269
-
270
- * Breaking Changes
271
- * made scrypt the default crypto provider from SHA512
272
- (https://github.com/binarylogic/authlogic#upgrading-to-authlogic-340)
273
- See UPGRADING.md.
274
-
275
- * Added
276
- * officially support rails 4 (still supporting rails 3)
277
- * added cookie signing
278
- * added request store for better concurency for threaded environments
279
- * added a rack adapter for Rack middleware support
280
-
281
- * Fixed
282
- * ditched appraisal
283
- * improved find_with_case default performance
284
- * added travis ci support
285
-
286
- ## 3.3.0 2014-04-04
287
-
288
- * changes
289
- * added safeguard against a sqli that was also fixed in rails 3.2.10/3.1.9/3.0.18
290
- * imposed the bcrypt gem's mincost
291
- * removed shoulda macros
292
-
293
- ## 3.2.0 2012-12-07
294
-
295
- * new
296
- * scrypt support
297
-
298
- * changes
299
- * moved back to LOWER for find_with_case ci lookups
300
-
301
- ## 3.1.3 2012-06-13
302
-
303
- * changes
304
- * removed jeweler
305
-
306
- ## 3.1.2 2012-06-01
307
-
308
- * changes
309
- * mostly test fixes
310
-
311
- ## 3.1.1 2012-06-01
312
-
313
- * changes
314
- * mostly doc fixes
315
-
316
- ## 3.1.0 2011-10-19
317
-
318
- * changes
319
- * mostly small bug fixes
320
-
321
- ## 3.0.3 2011-05-17
322
-
323
- * changes
324
- * rails 3.1 support
325
-
326
- * new
327
- * http auth support
328
-
329
- ## 3.0.2 2011-04-30
330
-
331
- * changes
332
- * doc fixes
333
-
334
- ## 3.0.1 2011-04-30
335
-
336
- * changes
337
- * switch from LOWER to LIKE for find_with_case ci lookups
338
-
339
- ## 3.0.0 2011-04-30
340
-
341
- * new
342
- * ssl cookie support
343
- * httponly cookie support
344
- * added a session generator
345
-
346
- * changes
347
- * rails 3 support
348
- * ruby 1.9.2 support
data/CONTRIBUTING.md DELETED
@@ -1,91 +0,0 @@
1
- # Contributing to Authlogic
2
-
3
- ## Issues
4
-
5
- ### Security Issues
6
-
7
- **Do not disclose security issues in public.** Instead, please email:
8
-
9
- ```
10
- Ben Johnson <bjohnson@binarylogic.com>,
11
- Tieg Zaharia <tieg.zaharia@gmail.com>
12
- Jared Beck <jared@jaredbeck.com>
13
- ```
14
-
15
- We will review security issues promptly.
16
-
17
- ### Non-Security Issues
18
-
19
- Please use github issues only for bug reports and feature suggestions.
20
-
21
- ### Usage Questions
22
-
23
- Please ask usage questions on
24
- [stackoverflow](http://stackoverflow.com/questions/tagged/authlogic).
25
-
26
- ## Development
27
-
28
- Most local development should be done using the oldest supported version of
29
- ruby. See `required_ruby_version` in the gemspec.
30
-
31
- ### Testing
32
-
33
- Tests can be run against different versions of Rails like so:
34
-
35
- ```
36
- BUNDLE_GEMFILE=gemfiles/Gemfile.rails-4.2.x bundle install
37
- BUNDLE_GEMFILE=gemfiles/Gemfile.rails-4.2.x bundle exec rake
38
- ```
39
-
40
- To run a single test:
41
-
42
- ```
43
- BUNDLE_GEMFILE=gemfiles/Gemfile.rails-4.2.x \
44
- bundle exec ruby -I test path/to/test.rb
45
- ```
46
-
47
- Bundler can be omitted, and the latest installed version of a gem dependency
48
- will be used. This is only suitable for certain unit tests.
49
-
50
- ```
51
- ruby –I test path/to/test.rb
52
- ```
53
-
54
- ### Linting
55
-
56
- Running `rake` also runs a linter, rubocop. Contributions must pass both
57
- the linter and the tests. The linter can be run on its own.
58
-
59
- ```
60
- BUNDLE_GEMFILE=gemfiles/Gemfile.rails-4.2.x bundle exec rubocop
61
- ```
62
-
63
- To run the tests without linting, use `rake test`.
64
-
65
- ```
66
- BUNDLE_GEMFILE=gemfiles/Gemfile.rails-4.2.x bundle exec rake test
67
- ```
68
-
69
- ### Version Control Branches
70
-
71
- We've been trying to follow the rails way, stable branches, but have been
72
- inconsistent. We should have one branche for each minor version, named like
73
- `4-3-stable`. Releases should be done on those branches, not in master. So,
74
- the "stable" branches should be the only branches with release tags.
75
-
76
- ### A normal release (no backport)
77
-
78
- 1. git checkout 4-3-stable # the latest "stable" branch (see above)
79
- 1. Update version number in lib/authlogic/version.rb
80
- 1. In the changelog,
81
- - Add release date to entry
82
- - Add a new "Unreleased" section at top
83
- 1. In the readme,
84
- - Update version number in the docs table at the top
85
- - For non-patch versions, update the compatibility table
86
- 1. Commit with message like "Release 4.3.0"
87
- 1. git tag -a -m "v4.3.0" "v4.3.0"
88
- 1. git push --tags origin 4-3-stable # or whatever branch (see above)
89
- 1. CI should pass
90
- 1. gem build authlogic.gemspec
91
- 1. gem push authlogic-4.3.0
data/Gemfile DELETED
@@ -1,6 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org"
4
- gemspec
5
-
6
- gem "sqlite3", "~> 1.3.6", platforms: :ruby
data/LICENSE DELETED
@@ -1,20 +0,0 @@
1
- Copyright (c) 2011 Ben Johnson of Binary Logic
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.