two_factor_authentication 1.1.3 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +21 -0
- data/.gitignore +2 -0
- data/.rubocop.yml +295 -0
- data/.travis.yml +14 -7
- data/CHANGELOG.md +119 -0
- data/Gemfile +12 -3
- data/README.md +320 -58
- data/app/controllers/devise/two_factor_authentication_controller.rb +65 -25
- data/app/views/devise/two_factor_authentication/show.html.erb +11 -2
- data/config/locales/en.yml +1 -0
- data/config/locales/es.yml +8 -0
- data/config/locales/fr.yml +8 -0
- data/config/locales/ru.yml +1 -0
- data/lib/generators/active_record/templates/migration.rb +9 -11
- data/lib/two_factor_authentication/controllers/helpers.rb +3 -3
- data/lib/two_factor_authentication/hooks/two_factor_authenticatable.rb +12 -2
- data/lib/two_factor_authentication/models/two_factor_authenticatable.rb +158 -29
- data/lib/two_factor_authentication/orm/active_record.rb +2 -0
- data/lib/two_factor_authentication/routes.rb +3 -1
- data/lib/two_factor_authentication/schema.rb +24 -4
- data/lib/two_factor_authentication/version.rb +1 -1
- data/lib/two_factor_authentication.rb +20 -3
- data/spec/controllers/two_factor_authentication_controller_spec.rb +41 -0
- data/spec/features/two_factor_authenticatable_spec.rb +179 -30
- data/spec/generators/active_record/two_factor_authentication_generator_spec.rb +36 -0
- data/spec/lib/two_factor_authentication/models/two_factor_authenticatable_spec.rb +272 -114
- data/spec/rails_app/app/controllers/home_controller.rb +1 -1
- data/spec/rails_app/app/models/admin.rb +6 -0
- data/spec/rails_app/app/models/encrypted_user.rb +15 -0
- data/spec/rails_app/app/models/guest_user.rb +8 -1
- data/spec/rails_app/app/models/user.rb +3 -4
- data/spec/rails_app/config/environments/test.rb +10 -1
- data/spec/rails_app/config/initializers/devise.rb +5 -3
- data/spec/rails_app/config/routes.rb +1 -0
- data/spec/rails_app/db/migrate/20140403184646_devise_create_users.rb +2 -2
- data/spec/rails_app/db/migrate/20140407172619_two_factor_authentication_add_to_users.rb +1 -1
- data/spec/rails_app/db/migrate/20140407215513_add_nickanme_to_users.rb +1 -1
- data/spec/rails_app/db/migrate/20151224171231_add_encrypted_columns_to_user.rb +9 -0
- data/spec/rails_app/db/migrate/20151224180310_populate_otp_column.rb +19 -0
- data/spec/rails_app/db/migrate/20151228230340_remove_otp_secret_key_from_user.rb +5 -0
- data/spec/rails_app/db/migrate/20160209032439_devise_create_admins.rb +42 -0
- data/spec/rails_app/db/schema.rb +35 -18
- data/spec/spec_helper.rb +4 -0
- data/spec/support/authenticated_model_helper.rb +33 -2
- data/spec/support/controller_helper.rb +16 -0
- data/spec/support/features_spec_helper.rb +24 -1
- data/spec/support/totp_helper.rb +11 -0
- data/two_factor_authentication.gemspec +4 -2
- metadata +133 -30
- data/spec/controllers/two_factor_auth_spec.rb +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d6d6636a281220ef8fd5aee19a4c4aaa4129797
|
4
|
+
data.tar.gz: 4954c89fa183dcb47c3104bfb14035ceaf6d20f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c559cf0c9c2c21519efdf25ce615ca5930dfc657564e4209b77298944ea3a2342414e7772b493db65c657c617641d0af4398a31bca0d3fbf81025e417fb688c2
|
7
|
+
data.tar.gz: 7e0d5abb909bb53f04d3d0cb887a4e869944eda656318c7e782562ecdf7bd635c8079d144506b1633e71c83368604b989dd9b4a21f2d8c21cb41d1f2849b3b58
|
data/.codeclimate.yml
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
engines:
|
2
|
+
brakeman:
|
3
|
+
enabled: true
|
4
|
+
duplication:
|
5
|
+
enabled: true
|
6
|
+
config:
|
7
|
+
languages:
|
8
|
+
- ruby
|
9
|
+
# mass_threshold: 30
|
10
|
+
exclude_paths:
|
11
|
+
- 'spec/**/*'
|
12
|
+
fixme:
|
13
|
+
enabled: true
|
14
|
+
rubocop:
|
15
|
+
enabled: true
|
16
|
+
|
17
|
+
ratings:
|
18
|
+
paths:
|
19
|
+
- app/**
|
20
|
+
- lib/**
|
21
|
+
- '**.rb'
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
@@ -0,0 +1,295 @@
|
|
1
|
+
AllCops:
|
2
|
+
Include:
|
3
|
+
- '**/Gemfile'
|
4
|
+
- '**/Rakefile'
|
5
|
+
UseCache: true
|
6
|
+
|
7
|
+
Lint/AssignmentInCondition:
|
8
|
+
Description: Don't use assignment in conditions.
|
9
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
|
10
|
+
Enabled: true
|
11
|
+
AllowSafeAssignment: true
|
12
|
+
Lint/EachWithObjectArgument:
|
13
|
+
Description: Check for immutable argument given to each_with_object.
|
14
|
+
Enabled: true
|
15
|
+
Lint/HandleExceptions:
|
16
|
+
Description: Don't suppress exception.
|
17
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
|
18
|
+
Enabled: true
|
19
|
+
Lint/LiteralInCondition:
|
20
|
+
Description: Checks of literals used in conditions.
|
21
|
+
Enabled: true
|
22
|
+
Lint/LiteralInInterpolation:
|
23
|
+
Description: Checks for literals used in interpolation.
|
24
|
+
Enabled: true
|
25
|
+
Lint/ParenthesesAsGroupedExpression:
|
26
|
+
Description: Checks for method calls with a space before the opening parenthesis.
|
27
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
28
|
+
Enabled: true
|
29
|
+
|
30
|
+
Metrics/AbcSize:
|
31
|
+
Description: A calculated magnitude based on number of assignments, branches, and
|
32
|
+
conditions.
|
33
|
+
Enabled: true
|
34
|
+
Max: 15
|
35
|
+
Exclude:
|
36
|
+
- spec/**/*
|
37
|
+
Metrics/ClassLength:
|
38
|
+
Description: Avoid classes longer than 100 lines of code.
|
39
|
+
Enabled: true
|
40
|
+
CountComments: false
|
41
|
+
Max: 100
|
42
|
+
Exclude:
|
43
|
+
- spec/**/*
|
44
|
+
Metrics/CyclomaticComplexity:
|
45
|
+
Description: A complexity metric that is strongly correlated to the number of test
|
46
|
+
cases needed to validate a method.
|
47
|
+
Enabled: true
|
48
|
+
Max: 6
|
49
|
+
Metrics/LineLength:
|
50
|
+
Description: Limit lines to 80 characters.
|
51
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#80-character-limits
|
52
|
+
Enabled: true
|
53
|
+
Max: 100
|
54
|
+
AllowURI: true
|
55
|
+
URISchemes:
|
56
|
+
- http
|
57
|
+
- https
|
58
|
+
Metrics/MethodLength:
|
59
|
+
Description: Avoid methods longer than 10 lines of code.
|
60
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
|
61
|
+
Enabled: true
|
62
|
+
CountComments: false
|
63
|
+
Max: 10
|
64
|
+
Exclude:
|
65
|
+
- spec/**/*
|
66
|
+
Metrics/ModuleLength:
|
67
|
+
CountComments: false
|
68
|
+
Max: 100
|
69
|
+
Description: Avoid modules longer than 100 lines of code.
|
70
|
+
Enabled: true
|
71
|
+
Exclude:
|
72
|
+
- spec/**/*
|
73
|
+
Metrics/ParameterLists:
|
74
|
+
Description: Avoid parameter lists longer than three or four parameters.
|
75
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
|
76
|
+
Enabled: true
|
77
|
+
Max: 5
|
78
|
+
CountKeywordArgs: true
|
79
|
+
Metrics/PerceivedComplexity:
|
80
|
+
Description: A complexity metric geared towards measuring complexity for a human
|
81
|
+
reader.
|
82
|
+
Enabled: true
|
83
|
+
Max: 7
|
84
|
+
|
85
|
+
Rails/ScopeArgs:
|
86
|
+
Description: Checks the arguments of ActiveRecord scopes.
|
87
|
+
Enabled: true
|
88
|
+
Rails/TimeZone:
|
89
|
+
# The value `strict` means that `Time` should be used with `zone`.
|
90
|
+
# The value `flexible` allows usage of `in_time_zone` instead of `zone`.
|
91
|
+
Enabled: true
|
92
|
+
EnforcedStyle: flexible
|
93
|
+
SupportedStyles:
|
94
|
+
- strict
|
95
|
+
- flexible
|
96
|
+
|
97
|
+
Style/AccessorMethodName:
|
98
|
+
Description: Check the naming of accessor methods for get_/set_.
|
99
|
+
Enabled: false
|
100
|
+
Style/AndOr:
|
101
|
+
Description: Use &&/|| instead of and/or.
|
102
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
|
103
|
+
Enabled: true
|
104
|
+
EnforcedStyle: conditionals
|
105
|
+
SupportedStyles:
|
106
|
+
- always
|
107
|
+
- conditionals
|
108
|
+
Style/Alias:
|
109
|
+
Description: Use alias_method instead of alias.
|
110
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
|
111
|
+
Enabled: true
|
112
|
+
Style/ClassAndModuleChildren:
|
113
|
+
EnforcedStyle: nested
|
114
|
+
SupportedStyles:
|
115
|
+
- nested
|
116
|
+
- compact
|
117
|
+
Style/CollectionMethods:
|
118
|
+
Description: Preferred collection methods.
|
119
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
|
120
|
+
Enabled: true
|
121
|
+
PreferredMethods:
|
122
|
+
collect: map
|
123
|
+
collect!: map!
|
124
|
+
find: detect
|
125
|
+
find_all: select
|
126
|
+
reduce: inject
|
127
|
+
Style/Documentation:
|
128
|
+
Description: Document classes and non-namespace modules.
|
129
|
+
Enabled: false
|
130
|
+
Style/DotPosition:
|
131
|
+
Description: Checks the position of the dot in multi-line method calls.
|
132
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
|
133
|
+
Enabled: true
|
134
|
+
EnforcedStyle: trailing
|
135
|
+
SupportedStyles:
|
136
|
+
- leading
|
137
|
+
- trailing
|
138
|
+
Style/DoubleNegation:
|
139
|
+
Description: Checks for uses of double negation (!!).
|
140
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
|
141
|
+
Enabled: true
|
142
|
+
Style/EachWithObject:
|
143
|
+
Description: Prefer `each_with_object` over `inject` or `reduce`.
|
144
|
+
Enabled: true
|
145
|
+
Style/EmptyLiteral:
|
146
|
+
Description: Prefer literals to Array.new/Hash.new/String.new.
|
147
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
|
148
|
+
Enabled: true
|
149
|
+
Style/FileName:
|
150
|
+
Description: Use snake_case for source file names.
|
151
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
|
152
|
+
Enabled: true
|
153
|
+
Exclude: []
|
154
|
+
Style/GuardClause:
|
155
|
+
Description: Check for conditionals that can be replaced with guard clauses
|
156
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
157
|
+
Enabled: true
|
158
|
+
MinBodyLength: 1
|
159
|
+
Style/IfUnlessModifier:
|
160
|
+
Description: Favor modifier if/unless usage when you have a single-line body.
|
161
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
|
162
|
+
Enabled: false
|
163
|
+
MaxLineLength: 80
|
164
|
+
Style/InlineComment:
|
165
|
+
Description: Avoid inline comments.
|
166
|
+
Enabled: false
|
167
|
+
Style/ModuleFunction:
|
168
|
+
Description: Checks for usage of `extend self` in modules.
|
169
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
|
170
|
+
Enabled: false
|
171
|
+
Style/OneLineConditional:
|
172
|
+
Description: Favor the ternary operator(?:) over if/then/else/end constructs.
|
173
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
|
174
|
+
Enabled: false
|
175
|
+
Style/OptionHash:
|
176
|
+
Description: Don't use option hashes when you can use keyword arguments.
|
177
|
+
Enabled: false
|
178
|
+
Style/PercentLiteralDelimiters:
|
179
|
+
Description: Use `%`-literal delimiters consistently
|
180
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
|
181
|
+
Enabled: true
|
182
|
+
PreferredDelimiters:
|
183
|
+
"%": "()"
|
184
|
+
"%i": "()"
|
185
|
+
"%q": "()"
|
186
|
+
"%Q": "()"
|
187
|
+
"%r": "{}"
|
188
|
+
"%s": "()"
|
189
|
+
"%w": "()"
|
190
|
+
"%W": "()"
|
191
|
+
"%x": "()"
|
192
|
+
Style/PerlBackrefs:
|
193
|
+
Description: Avoid Perl-style regex back references.
|
194
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
|
195
|
+
Enabled: false
|
196
|
+
Style/PredicateName:
|
197
|
+
Description: Check the names of predicate methods.
|
198
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
|
199
|
+
Enabled: true
|
200
|
+
NamePrefix:
|
201
|
+
- is_
|
202
|
+
- has_
|
203
|
+
- have_
|
204
|
+
NamePrefixBlacklist:
|
205
|
+
- is_
|
206
|
+
Exclude:
|
207
|
+
- spec/**/*
|
208
|
+
Style/RaiseArgs:
|
209
|
+
Description: Checks the arguments passed to raise/fail.
|
210
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
|
211
|
+
Enabled: true
|
212
|
+
EnforcedStyle: exploded
|
213
|
+
SupportedStyles:
|
214
|
+
- compact
|
215
|
+
- exploded
|
216
|
+
Style/Send:
|
217
|
+
Description: Prefer `Object#__send__` or `Object#public_send` to `send`, as `send`
|
218
|
+
may overlap with existing methods.
|
219
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-public-send
|
220
|
+
Enabled: false
|
221
|
+
Style/SignalException:
|
222
|
+
Description: Checks for proper usage of fail and raise.
|
223
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
|
224
|
+
Enabled: true
|
225
|
+
EnforcedStyle: semantic
|
226
|
+
SupportedStyles:
|
227
|
+
- only_raise
|
228
|
+
- only_fail
|
229
|
+
- semantic
|
230
|
+
Style/SingleLineBlockParams:
|
231
|
+
Description: Enforces the names of some block params.
|
232
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
|
233
|
+
Enabled: true
|
234
|
+
Methods:
|
235
|
+
- reduce:
|
236
|
+
- a
|
237
|
+
- e
|
238
|
+
- inject:
|
239
|
+
- a
|
240
|
+
- e
|
241
|
+
Style/SingleLineMethods:
|
242
|
+
Description: Avoid single-line methods.
|
243
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
|
244
|
+
Enabled: true
|
245
|
+
AllowIfMethodIsEmpty: true
|
246
|
+
Style/SpecialGlobalVars:
|
247
|
+
Description: Avoid Perl-style global variables.
|
248
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
|
249
|
+
Enabled: false
|
250
|
+
Style/StringLiterals:
|
251
|
+
Description: Checks if uses of quotes match the configured preference.
|
252
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
|
253
|
+
Enabled: true
|
254
|
+
EnforcedStyle: single_quotes
|
255
|
+
SupportedStyles:
|
256
|
+
- single_quotes
|
257
|
+
- double_quotes
|
258
|
+
Style/StringLiteralsInInterpolation:
|
259
|
+
Description: Checks if uses of quotes inside expressions in interpolated strings
|
260
|
+
match the configured preference.
|
261
|
+
Enabled: true
|
262
|
+
EnforcedStyle: single_quotes
|
263
|
+
SupportedStyles:
|
264
|
+
- single_quotes
|
265
|
+
- double_quotes
|
266
|
+
Style/TrailingCommaInArguments:
|
267
|
+
Description: 'Checks for trailing comma in argument lists.'
|
268
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
269
|
+
Enabled: true
|
270
|
+
EnforcedStyleForMultiline: no_comma
|
271
|
+
SupportedStyles:
|
272
|
+
- comma
|
273
|
+
- consistent_comma
|
274
|
+
- no_comma
|
275
|
+
Style/TrailingCommaInLiteral:
|
276
|
+
Description: 'Checks for trailing comma in array and hash literals.'
|
277
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
278
|
+
Enabled: true
|
279
|
+
EnforcedStyleForMultiline: no_comma
|
280
|
+
SupportedStyles:
|
281
|
+
- comma
|
282
|
+
- consistent_comma
|
283
|
+
- no_comma
|
284
|
+
Style/VariableInterpolation:
|
285
|
+
Description: Don't interpolate global, instance and class variables directly in
|
286
|
+
strings.
|
287
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
|
288
|
+
Enabled: false
|
289
|
+
Style/WhenThen:
|
290
|
+
Description: Use when x then ... for one-line cases.
|
291
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
|
292
|
+
Enabled: false
|
293
|
+
Style/ZeroLengthPredicate:
|
294
|
+
Description: 'Use #empty? when testing for objects of length 0.'
|
295
|
+
Enabled: true
|
data/.travis.yml
CHANGED
@@ -1,21 +1,28 @@
|
|
1
1
|
language: ruby
|
2
2
|
|
3
3
|
env:
|
4
|
-
- "RAILS_VERSION=
|
5
|
-
- "RAILS_VERSION=
|
6
|
-
- "RAILS_VERSION=4.1.1"
|
4
|
+
- "RAILS_VERSION=4.2"
|
5
|
+
- "RAILS_VERSION=5.2"
|
7
6
|
- "RAILS_VERSION=master"
|
8
7
|
|
9
8
|
rvm:
|
10
|
-
-
|
11
|
-
- 2.
|
12
|
-
- 2.
|
9
|
+
- 2.3.8
|
10
|
+
- 2.4.5
|
11
|
+
- 2.5.3
|
13
12
|
|
14
13
|
matrix:
|
14
|
+
fast_finish: true
|
15
15
|
allow_failures:
|
16
16
|
- env: "RAILS_VERSION=master"
|
17
|
+
include:
|
18
|
+
- rvm: 2.2
|
19
|
+
env: RAILS_VERSION=4.2
|
20
|
+
|
21
|
+
before_install:
|
22
|
+
- gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
|
23
|
+
- gem install bundler -v '< 2'
|
17
24
|
|
18
25
|
before_script:
|
19
|
-
- bundle exec rake app:db:
|
26
|
+
- bundle exec rake app:db:setup
|
20
27
|
|
21
28
|
script: bundle exec rake spec
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,119 @@
|
|
1
|
+
# Change Log
|
2
|
+
|
3
|
+
## [Unreleased](https://github.com/Houdini/two_factor_authentication/tree/HEAD)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/Houdini/two_factor_authentication/compare/v1.1.5...HEAD)
|
6
|
+
|
7
|
+
**Merged pull requests:**
|
8
|
+
|
9
|
+
- Fix class detection in reset\_otp\_state\_for\(user\) [\#69](https://github.com/Houdini/two_factor_authentication/pull/69) ([monfresh](https://github.com/monfresh))
|
10
|
+
- Add ability to resend code [\#52](https://github.com/Houdini/two_factor_authentication/pull/52) ([iDiogenes](https://github.com/iDiogenes))
|
11
|
+
|
12
|
+
## [v1.1.5](https://github.com/Houdini/two_factor_authentication/tree/v1.1.5) (2016-02-01)
|
13
|
+
[Full Changelog](https://github.com/Houdini/two_factor_authentication/compare/v1.1.4...v1.1.5)
|
14
|
+
|
15
|
+
**Closed issues:**
|
16
|
+
|
17
|
+
- How should I integrate Devise two factor authentication with custom sessions controller? [\#60](https://github.com/Houdini/two_factor_authentication/issues/60)
|
18
|
+
|
19
|
+
**Merged pull requests:**
|
20
|
+
|
21
|
+
- added french translation [\#68](https://github.com/Houdini/two_factor_authentication/pull/68) ([qsypoq](https://github.com/qsypoq))
|
22
|
+
- Drop support for Ruby 1.9.3 & update .travis.yml [\#67](https://github.com/Houdini/two_factor_authentication/pull/67) ([monfresh](https://github.com/monfresh))
|
23
|
+
- Fix reset\_otp\_state specs [\#66](https://github.com/Houdini/two_factor_authentication/pull/66) ([monfresh](https://github.com/monfresh))
|
24
|
+
- Add a CHANGELOG.md [\#65](https://github.com/Houdini/two_factor_authentication/pull/65) ([monfresh](https://github.com/monfresh))
|
25
|
+
- Update bundler on Travis before installing gems [\#63](https://github.com/Houdini/two_factor_authentication/pull/63) ([monfresh](https://github.com/monfresh))
|
26
|
+
- Add support for OTP secret key encryption [\#62](https://github.com/Houdini/two_factor_authentication/pull/62) ([monfresh](https://github.com/monfresh))
|
27
|
+
- Allow executing code after sign in and before sign out [\#61](https://github.com/Houdini/two_factor_authentication/pull/61) ([monfresh](https://github.com/monfresh))
|
28
|
+
|
29
|
+
## [v1.1.4](https://github.com/Houdini/two_factor_authentication/tree/v1.1.4) (2016-01-01)
|
30
|
+
[Full Changelog](https://github.com/Houdini/two_factor_authentication/compare/v1.1.3...v1.1.4)
|
31
|
+
|
32
|
+
**Closed issues:**
|
33
|
+
|
34
|
+
- Old OTP can be used after a new one has been generated [\#59](https://github.com/Houdini/two_factor_authentication/issues/59)
|
35
|
+
- Do we have any two\_factor\_method like authenticate\_user! [\#58](https://github.com/Houdini/two_factor_authentication/issues/58)
|
36
|
+
- Configuration [\#57](https://github.com/Houdini/two_factor_authentication/issues/57)
|
37
|
+
|
38
|
+
**Merged pull requests:**
|
39
|
+
|
40
|
+
- Abstract logic for two factor success and fail into separate methods.… [\#56](https://github.com/Houdini/two_factor_authentication/pull/56) ([kpheasey](https://github.com/kpheasey))
|
41
|
+
- Move require rotp library to the file where it is used [\#55](https://github.com/Houdini/two_factor_authentication/pull/55) ([gkopylov](https://github.com/gkopylov))
|
42
|
+
- Add support for remembering a user's 2FA session in a cookie [\#54](https://github.com/Houdini/two_factor_authentication/pull/54) ([boffbowsh](https://github.com/boffbowsh))
|
43
|
+
- Test against Ruby 2.2 and Rails 4.2 [\#53](https://github.com/Houdini/two_factor_authentication/pull/53) ([boffbowsh](https://github.com/boffbowsh))
|
44
|
+
- Eliminates appended '?' to redirects that have no query string [\#46](https://github.com/Houdini/two_factor_authentication/pull/46) ([daveriess](https://github.com/daveriess))
|
45
|
+
|
46
|
+
## [v1.1.3](https://github.com/Houdini/two_factor_authentication/tree/v1.1.3) (2014-12-14)
|
47
|
+
[Full Changelog](https://github.com/Houdini/two_factor_authentication/compare/v1.1.2...v1.1.3)
|
48
|
+
|
49
|
+
**Closed issues:**
|
50
|
+
|
51
|
+
- rails g two\_factor\_authentication MODEL does not append .rb to end of migration [\#40](https://github.com/Houdini/two_factor_authentication/issues/40)
|
52
|
+
|
53
|
+
**Merged pull requests:**
|
54
|
+
|
55
|
+
- Allows length of OTP to be configured [\#44](https://github.com/Houdini/two_factor_authentication/pull/44) ([amoose](https://github.com/amoose))
|
56
|
+
- Missing translation. [\#43](https://github.com/Houdini/two_factor_authentication/pull/43) ([sadfuzzy](https://github.com/sadfuzzy))
|
57
|
+
- Preserve query parameters in \_return\_to for redirect. [\#42](https://github.com/Houdini/two_factor_authentication/pull/42) ([omb-awong](https://github.com/omb-awong))
|
58
|
+
- Add file extension to ActiveRecord generator [\#41](https://github.com/Houdini/two_factor_authentication/pull/41) ([jackturnbull](https://github.com/jackturnbull))
|
59
|
+
|
60
|
+
## [v1.1.2](https://github.com/Houdini/two_factor_authentication/tree/v1.1.2) (2014-07-14)
|
61
|
+
[Full Changelog](https://github.com/Houdini/two_factor_authentication/compare/v1.1.1...v1.1.2)
|
62
|
+
|
63
|
+
**Closed issues:**
|
64
|
+
|
65
|
+
- NoMethodError \(undefined method `scan' for nil:NilClass\) [\#37](https://github.com/Houdini/two_factor_authentication/issues/37)
|
66
|
+
|
67
|
+
**Merged pull requests:**
|
68
|
+
|
69
|
+
- Updated readme with rake task to update existing users with OTP secret k... [\#39](https://github.com/Houdini/two_factor_authentication/pull/39) ([Znow](https://github.com/Znow))
|
70
|
+
- Updated readme with view overriding [\#38](https://github.com/Houdini/two_factor_authentication/pull/38) ([Znow](https://github.com/Znow))
|
71
|
+
|
72
|
+
## [v1.1.1](https://github.com/Houdini/two_factor_authentication/tree/v1.1.1) (2014-05-31)
|
73
|
+
[Full Changelog](https://github.com/Houdini/two_factor_authentication/compare/v1.1...v1.1.1)
|
74
|
+
|
75
|
+
**Closed issues:**
|
76
|
+
|
77
|
+
- Override views [\#36](https://github.com/Houdini/two_factor_authentication/issues/36)
|
78
|
+
- NoMethodError in Devise::TwoFactorAuthenticationController\#update [\#30](https://github.com/Houdini/two_factor_authentication/issues/30)
|
79
|
+
|
80
|
+
**Merged pull requests:**
|
81
|
+
|
82
|
+
- Use Strings and not Symbols for keys when storing variable in warden session [\#35](https://github.com/Houdini/two_factor_authentication/pull/35) ([karolsarnacki](https://github.com/karolsarnacki))
|
83
|
+
- Chore/extract reused hash key [\#34](https://github.com/Houdini/two_factor_authentication/pull/34) ([rud](https://github.com/rud))
|
84
|
+
- Pad OTP codes with less than 6 digits [\#31](https://github.com/Houdini/two_factor_authentication/pull/31) ([brissmyr](https://github.com/brissmyr))
|
85
|
+
|
86
|
+
## [v1.1](https://github.com/Houdini/two_factor_authentication/tree/v1.1) (2014-04-16)
|
87
|
+
**Closed issues:**
|
88
|
+
|
89
|
+
- Update [\#15](https://github.com/Houdini/two_factor_authentication/issues/15)
|
90
|
+
- Data in formats other than HTML left unprotected [\#6](https://github.com/Houdini/two_factor_authentication/issues/6)
|
91
|
+
- Wordlists [\#5](https://github.com/Houdini/two_factor_authentication/issues/5)
|
92
|
+
- devise - wrong number of arguments \(1 for 0\) [\#3](https://github.com/Houdini/two_factor_authentication/issues/3)
|
93
|
+
- gem? [\#1](https://github.com/Houdini/two_factor_authentication/issues/1)
|
94
|
+
|
95
|
+
**Merged pull requests:**
|
96
|
+
|
97
|
+
- added is\_fully\_authenticated helper for current version [\#28](https://github.com/Houdini/two_factor_authentication/pull/28) ([edg3r](https://github.com/edg3r))
|
98
|
+
- Adds integration spec to ensure authentication code is sent on sign in [\#27](https://github.com/Houdini/two_factor_authentication/pull/27) ([rossta](https://github.com/rossta))
|
99
|
+
- ensure return\_to location is properly stored [\#26](https://github.com/Houdini/two_factor_authentication/pull/26) ([rossta](https://github.com/rossta))
|
100
|
+
- travis badge in README [\#25](https://github.com/Houdini/two_factor_authentication/pull/25) ([rossta](https://github.com/rossta))
|
101
|
+
- Integration specs [\#24](https://github.com/Houdini/two_factor_authentication/pull/24) ([rossta](https://github.com/rossta))
|
102
|
+
- README updates [\#23](https://github.com/Houdini/two_factor_authentication/pull/23) ([rossta](https://github.com/rossta))
|
103
|
+
- extract method \#max\_login\_attempts [\#22](https://github.com/Houdini/two_factor_authentication/pull/22) ([rossta](https://github.com/rossta))
|
104
|
+
- extract method \#populate\_otp\_column [\#21](https://github.com/Houdini/two_factor_authentication/pull/21) ([rossta](https://github.com/rossta))
|
105
|
+
- specs for Model\#provisioning\_uri [\#20](https://github.com/Houdini/two_factor_authentication/pull/20) ([rossta](https://github.com/rossta))
|
106
|
+
- Provide options for \#provisioning\_uri [\#19](https://github.com/Houdini/two_factor_authentication/pull/19) ([rossta](https://github.com/rossta))
|
107
|
+
- Use time-based authentication codes [\#16](https://github.com/Houdini/two_factor_authentication/pull/16) ([mattmueller](https://github.com/mattmueller))
|
108
|
+
- Add ru locales and locales for max\_limit\_reached view [\#13](https://github.com/Houdini/two_factor_authentication/pull/13) ([edg3r](https://github.com/edg3r))
|
109
|
+
- Update README.md [\#11](https://github.com/Houdini/two_factor_authentication/pull/11) ([edg3r](https://github.com/edg3r))
|
110
|
+
- Changed route from user to admin\_user [\#10](https://github.com/Houdini/two_factor_authentication/pull/10) ([ilanstern](https://github.com/ilanstern))
|
111
|
+
- Changed :notice to :error when setting flash message on attempt failure. [\#9](https://github.com/Houdini/two_factor_authentication/pull/9) ([johnmichaelbradley](https://github.com/johnmichaelbradley))
|
112
|
+
- Typo and punctuation corrections. [\#8](https://github.com/Houdini/two_factor_authentication/pull/8) ([johnmichaelbradley](https://github.com/johnmichaelbradley))
|
113
|
+
- Respond with 401 for request non-HTML requests [\#7](https://github.com/Houdini/two_factor_authentication/pull/7) ([WojtekKruszewski](https://github.com/WojtekKruszewski))
|
114
|
+
- need\_two\_factor\_authentication? method should accept request param. [\#4](https://github.com/Houdini/two_factor_authentication/pull/4) ([VladimirMikhailov](https://github.com/VladimirMikhailov))
|
115
|
+
- Add generators to make it easier to install and fix deprecation warnings [\#2](https://github.com/Houdini/two_factor_authentication/pull/2) ([carvil](https://github.com/carvil))
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
data/Gemfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
source
|
1
|
+
source 'https://rubygems.org'
|
2
2
|
|
3
3
|
# Specify your gem's dependencies in devise_ip_filter.gemspec
|
4
4
|
gemspec
|
@@ -9,13 +9,22 @@ rails = case rails_version
|
|
9
9
|
when "master"
|
10
10
|
{github: "rails/rails"}
|
11
11
|
when "default"
|
12
|
-
"~>
|
12
|
+
"~> 5.2"
|
13
13
|
else
|
14
14
|
"~> #{rails_version}"
|
15
15
|
end
|
16
16
|
|
17
17
|
gem "rails", rails
|
18
18
|
|
19
|
+
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.2.0')
|
20
|
+
gem "test-unit", "~> 3.0"
|
21
|
+
end
|
22
|
+
|
23
|
+
group :test, :development do
|
24
|
+
gem 'sqlite3'
|
25
|
+
end
|
26
|
+
|
19
27
|
group :test do
|
20
|
-
gem
|
28
|
+
gem 'rack_session_access'
|
29
|
+
gem 'ammeter'
|
21
30
|
end
|