jwt-auth 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +48 -19
- data/.travis.yml +11 -0
- data/README.md +1 -1
- data/jwt-auth.gemspec +24 -21
- data/lib/jwt/auth/authentication.rb +3 -3
- data/lib/jwt/auth/token.rb +14 -3
- data/lib/jwt/auth/version.rb +1 -1
- data/spec/authentication_spec.rb +95 -0
- data/spec/configuration_spec.rb +1 -1
- data/spec/dummy/.gitignore +41 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/config/manifest.js +4 -0
- data/spec/dummy/app/assets/images/.keep +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/javascripts/cable.js +13 -0
- data/spec/dummy/app/assets/javascripts/channels/.keep +0 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/channels/application_cable/channel.rb +4 -0
- data/spec/dummy/app/channels/application_cable/connection.rb +4 -0
- data/spec/dummy/app/controllers/application_controller.rb +13 -0
- data/spec/dummy/app/controllers/authentication_controller.rb +15 -0
- data/spec/dummy/app/controllers/concerns/.keep +0 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/helpers/authentication_helper.rb +2 -0
- data/spec/dummy/app/jobs/application_job.rb +2 -0
- data/spec/dummy/app/mailers/application_mailer.rb +4 -0
- data/spec/dummy/app/models/application_record.rb +3 -0
- data/spec/dummy/app/models/concerns/.keep +0 -0
- data/spec/dummy/app/models/user.rb +14 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/setup +38 -0
- data/spec/dummy/bin/update +29 -0
- data/spec/dummy/bin/yarn +11 -0
- data/spec/dummy/config.ru +5 -0
- data/spec/dummy/config/application.rb +18 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/cable.yml +10 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +54 -0
- data/spec/dummy/config/environments/production.rb +91 -0
- data/spec/dummy/config/environments/test.rb +42 -0
- data/spec/dummy/config/initializers/application_controller_renderer.rb +6 -0
- data/spec/dummy/config/initializers/assets.rb +14 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/jwt_auth.rb +11 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +33 -0
- data/spec/dummy/config/puma.rb +56 -0
- data/spec/dummy/config/routes.rb +6 -0
- data/spec/dummy/config/secrets.yml +32 -0
- data/spec/dummy/config/spring.rb +6 -0
- data/spec/dummy/db/migrate/20170726110751_create_users.rb +9 -0
- data/spec/dummy/db/migrate/20170726110825_add_token_version_to_user.rb +5 -0
- data/spec/dummy/db/migrate/20170726112117_add_activated_to_user.rb +5 -0
- data/spec/dummy/db/schema.rb +23 -0
- data/spec/dummy/lib/assets/.keep +0 -0
- data/spec/dummy/log/.keep +0 -0
- data/spec/dummy/package.json +5 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/spec/dummy/public/apple-touch-icon.png +0 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/tmp/.keep +0 -0
- data/spec/rails_helper.rb +50 -0
- data/spec/spec_helper.rb +4 -1
- data/spec/support/.keep +0 -0
- data/spec/token_spec.rb +76 -4
- metadata +196 -18
- data/spec/support/dummy_user.rb +0 -16
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
4
|
+
ENV['RAILS_ENV'] ||= 'test'
|
5
|
+
abort('The Rails environment is running in production mode!') if Rails.env.production?
|
6
|
+
require 'spec_helper'
|
7
|
+
require 'rspec/rails'
|
8
|
+
# Add additional requires below this line. Rails is not loaded until this point!
|
9
|
+
|
10
|
+
require 'dummy/config/environment'
|
11
|
+
# ENV['RAILS_ROOT'] ||= File.join File.dirname(__FILE__), 'spec', 'dummy'
|
12
|
+
|
13
|
+
ActiveRecord::Migration.maintain_test_schema!
|
14
|
+
|
15
|
+
# Requires supporting ruby files with custom matchers and macros, etc, in
|
16
|
+
# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
|
17
|
+
# run as spec files by default. This means that files in spec/support that end
|
18
|
+
# in _spec.rb will both be required and run as specs, causing the specs to be
|
19
|
+
# run twice. It is recommended that you do not name files matching this glob to
|
20
|
+
# end with _spec.rb. You can configure this pattern with the --pattern
|
21
|
+
# option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
|
22
|
+
#
|
23
|
+
# The following line is provided for convenience purposes. It has the downside
|
24
|
+
# of increasing the boot-up time by auto-requiring all files in the support
|
25
|
+
# directory. Alternatively, in the individual `*_spec.rb` files, manually
|
26
|
+
# require only the support files necessary.
|
27
|
+
#
|
28
|
+
Dir['./spec/support/**/*.rb'].each { |f| require f }
|
29
|
+
|
30
|
+
RSpec.configure do |config|
|
31
|
+
# RSpec Rails can automatically mix in different behaviours to your tests
|
32
|
+
# based on their file location, for example enabling you to call `get` and
|
33
|
+
# `post` in specs under `spec/controllers`.
|
34
|
+
#
|
35
|
+
# You can disable this behaviour by removing the line below, and instead
|
36
|
+
# explicitly tag your specs with their type, e.g.:
|
37
|
+
#
|
38
|
+
# RSpec.describe UsersController, :type => :controller do
|
39
|
+
# # ...
|
40
|
+
# end
|
41
|
+
#
|
42
|
+
# The different available types are documented in the features, such as in
|
43
|
+
# https://relishapp.com/rspec/rspec-rails/docs
|
44
|
+
config.infer_spec_type_from_file_location!
|
45
|
+
|
46
|
+
# Filter lines from Rails gems in backtraces.
|
47
|
+
config.filter_rails_from_backtrace!
|
48
|
+
# arbitrary gems may also be filtered via:
|
49
|
+
# config.filter_gems_from_backtrace("gem name")
|
50
|
+
end
|
data/spec/spec_helper.rb
CHANGED
data/spec/support/.keep
ADDED
File without changes
|
data/spec/token_spec.rb
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'support/dummy_user'
|
4
|
-
|
5
3
|
RSpec.describe JWT::Auth::Token do
|
6
|
-
let(:user) {
|
4
|
+
let(:user) { User.create! :activated => true }
|
5
|
+
let(:token) { JWT::Auth::Token.from_user user }
|
7
6
|
|
8
7
|
describe 'properties' do
|
9
|
-
let(:token) {
|
8
|
+
let(:token) { JWT::Auth::Token.from_user user }
|
10
9
|
|
11
10
|
it 'has an expiration' do
|
12
11
|
expect(token).to respond_to :expiration
|
@@ -17,6 +16,79 @@ RSpec.describe JWT::Auth::Token do
|
|
17
16
|
expect(token).to respond_to :subject
|
18
17
|
expect(token.subject).to eq user
|
19
18
|
end
|
19
|
+
|
20
|
+
it 'has a token_version' do
|
21
|
+
expect(token).to respond_to :token_version
|
22
|
+
expect(token.token_version).to be_nil
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
describe 'valid?' do
|
27
|
+
it 'is invalid without subject' do
|
28
|
+
jwt = token.to_jwt
|
29
|
+
|
30
|
+
user.destroy
|
31
|
+
|
32
|
+
t = JWT::Auth::Token.from_token jwt
|
33
|
+
|
34
|
+
expect(t).not_to be_valid
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'is invalid without subject 2' do
|
38
|
+
t = JWT::Auth::Token.from_token token.to_jwt
|
39
|
+
|
40
|
+
user.destroy
|
41
|
+
|
42
|
+
expect(t).not_to be_valid
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'is invalid on token_version increment' do
|
46
|
+
t = JWT::Auth::Token.from_token token.to_jwt
|
47
|
+
|
48
|
+
expect(t).to be_valid
|
49
|
+
|
50
|
+
user.increment_token_version!
|
51
|
+
user.reload
|
52
|
+
|
53
|
+
expect(t).not_to be_valid
|
54
|
+
end
|
55
|
+
|
56
|
+
it 'is invalid on past date' do
|
57
|
+
token.expiration = 1.second.ago.to_i
|
58
|
+
|
59
|
+
t = JWT::Auth::Token.from_token token.to_jwt
|
60
|
+
|
61
|
+
expect(t).not_to be_valid
|
62
|
+
end
|
63
|
+
|
64
|
+
it 'is invalid after expiry date' do
|
65
|
+
token.expiration = Time.now.to_i
|
66
|
+
sleep 2
|
67
|
+
|
68
|
+
t = JWT::Auth::Token.from_token token.to_jwt
|
69
|
+
|
70
|
+
expect(t).not_to be_valid
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
describe 'renew!' do
|
75
|
+
it 'renews a token' do
|
76
|
+
old_jwt = token.to_jwt
|
77
|
+
old_token = JWT::Auth::Token.from_token old_jwt
|
78
|
+
|
79
|
+
expect(old_token).to be_valid
|
80
|
+
|
81
|
+
sleep 2
|
82
|
+
|
83
|
+
old_token.renew!
|
84
|
+
|
85
|
+
new_jwt = old_token.to_jwt
|
86
|
+
new_token = JWT::Auth::Token.from_token new_jwt
|
87
|
+
|
88
|
+
expect(new_token).to be_valid
|
89
|
+
expect(new_jwt).not_to eq old_jwt
|
90
|
+
expect(new_token.expiration).not_to eq old_token.expiration
|
91
|
+
end
|
20
92
|
end
|
21
93
|
|
22
94
|
describe 'from token' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jwt-auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Dejonckheere
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -30,42 +30,42 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '5.
|
33
|
+
version: '5.1'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '5.
|
40
|
+
version: '5.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '1.
|
47
|
+
version: '1.15'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '1.
|
54
|
+
version: '1.15'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rubocop
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
61
|
+
version: '0.49'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0.
|
68
|
+
version: '0.49'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,28 +86,56 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '3.
|
89
|
+
version: '3.6'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '3.
|
96
|
+
version: '3.6'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rspec-rails
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '3.
|
103
|
+
version: '3.6'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '3.
|
110
|
+
version: '3.6'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rdoc
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '5.1'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '5.1'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: coveralls
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0.8'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0.8'
|
111
139
|
- !ruby/object:Gem::Dependency
|
112
140
|
name: byebug
|
113
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,8 +150,21 @@ dependencies:
|
|
122
150
|
- - ">="
|
123
151
|
- !ruby/object:Gem::Version
|
124
152
|
version: '0'
|
125
|
-
|
126
|
-
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: sqlite3
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
description: Authentication middleware for Rails API that uses JWTs
|
127
168
|
email:
|
128
169
|
- florian@floriandejonckheere.be
|
129
170
|
executables: []
|
@@ -133,6 +174,7 @@ files:
|
|
133
174
|
- ".gitignore"
|
134
175
|
- ".rspec"
|
135
176
|
- ".rubocop.yml"
|
177
|
+
- ".travis.yml"
|
136
178
|
- Gemfile
|
137
179
|
- LICENSE.md
|
138
180
|
- README.md
|
@@ -145,9 +187,77 @@ files:
|
|
145
187
|
- lib/jwt/auth/errors.rb
|
146
188
|
- lib/jwt/auth/token.rb
|
147
189
|
- lib/jwt/auth/version.rb
|
190
|
+
- spec/authentication_spec.rb
|
148
191
|
- spec/configuration_spec.rb
|
192
|
+
- spec/dummy/.gitignore
|
193
|
+
- spec/dummy/Rakefile
|
194
|
+
- spec/dummy/app/assets/config/manifest.js
|
195
|
+
- spec/dummy/app/assets/images/.keep
|
196
|
+
- spec/dummy/app/assets/javascripts/application.js
|
197
|
+
- spec/dummy/app/assets/javascripts/cable.js
|
198
|
+
- spec/dummy/app/assets/javascripts/channels/.keep
|
199
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
200
|
+
- spec/dummy/app/channels/application_cable/channel.rb
|
201
|
+
- spec/dummy/app/channels/application_cable/connection.rb
|
202
|
+
- spec/dummy/app/controllers/application_controller.rb
|
203
|
+
- spec/dummy/app/controllers/authentication_controller.rb
|
204
|
+
- spec/dummy/app/controllers/concerns/.keep
|
205
|
+
- spec/dummy/app/helpers/application_helper.rb
|
206
|
+
- spec/dummy/app/helpers/authentication_helper.rb
|
207
|
+
- spec/dummy/app/jobs/application_job.rb
|
208
|
+
- spec/dummy/app/mailers/application_mailer.rb
|
209
|
+
- spec/dummy/app/models/application_record.rb
|
210
|
+
- spec/dummy/app/models/concerns/.keep
|
211
|
+
- spec/dummy/app/models/user.rb
|
212
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
213
|
+
- spec/dummy/app/views/layouts/mailer.html.erb
|
214
|
+
- spec/dummy/app/views/layouts/mailer.text.erb
|
215
|
+
- spec/dummy/bin/bundle
|
216
|
+
- spec/dummy/bin/rails
|
217
|
+
- spec/dummy/bin/rake
|
218
|
+
- spec/dummy/bin/setup
|
219
|
+
- spec/dummy/bin/update
|
220
|
+
- spec/dummy/bin/yarn
|
221
|
+
- spec/dummy/config.ru
|
222
|
+
- spec/dummy/config/application.rb
|
223
|
+
- spec/dummy/config/boot.rb
|
224
|
+
- spec/dummy/config/cable.yml
|
225
|
+
- spec/dummy/config/database.yml
|
226
|
+
- spec/dummy/config/environment.rb
|
227
|
+
- spec/dummy/config/environments/development.rb
|
228
|
+
- spec/dummy/config/environments/production.rb
|
229
|
+
- spec/dummy/config/environments/test.rb
|
230
|
+
- spec/dummy/config/initializers/application_controller_renderer.rb
|
231
|
+
- spec/dummy/config/initializers/assets.rb
|
232
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
233
|
+
- spec/dummy/config/initializers/cookies_serializer.rb
|
234
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
235
|
+
- spec/dummy/config/initializers/inflections.rb
|
236
|
+
- spec/dummy/config/initializers/jwt_auth.rb
|
237
|
+
- spec/dummy/config/initializers/mime_types.rb
|
238
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
239
|
+
- spec/dummy/config/locales/en.yml
|
240
|
+
- spec/dummy/config/puma.rb
|
241
|
+
- spec/dummy/config/routes.rb
|
242
|
+
- spec/dummy/config/secrets.yml
|
243
|
+
- spec/dummy/config/spring.rb
|
244
|
+
- spec/dummy/db/migrate/20170726110751_create_users.rb
|
245
|
+
- spec/dummy/db/migrate/20170726110825_add_token_version_to_user.rb
|
246
|
+
- spec/dummy/db/migrate/20170726112117_add_activated_to_user.rb
|
247
|
+
- spec/dummy/db/schema.rb
|
248
|
+
- spec/dummy/lib/assets/.keep
|
249
|
+
- spec/dummy/log/.keep
|
250
|
+
- spec/dummy/package.json
|
251
|
+
- spec/dummy/public/404.html
|
252
|
+
- spec/dummy/public/422.html
|
253
|
+
- spec/dummy/public/500.html
|
254
|
+
- spec/dummy/public/apple-touch-icon-precomposed.png
|
255
|
+
- spec/dummy/public/apple-touch-icon.png
|
256
|
+
- spec/dummy/public/favicon.ico
|
257
|
+
- spec/dummy/tmp/.keep
|
258
|
+
- spec/rails_helper.rb
|
149
259
|
- spec/spec_helper.rb
|
150
|
-
- spec/support
|
260
|
+
- spec/support/.keep
|
151
261
|
- spec/token_spec.rb
|
152
262
|
homepage: https://github.com/floriandejonckheere/jwt-auth
|
153
263
|
licenses:
|
@@ -169,12 +279,80 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
279
|
version: '0'
|
170
280
|
requirements: []
|
171
281
|
rubyforge_project:
|
172
|
-
rubygems_version: 2.6.
|
282
|
+
rubygems_version: 2.6.12
|
173
283
|
signing_key:
|
174
284
|
specification_version: 4
|
175
|
-
summary: JWT-based authentication for Rails API
|
285
|
+
summary: JWT-based authentication for Rails API
|
176
286
|
test_files:
|
287
|
+
- spec/authentication_spec.rb
|
177
288
|
- spec/configuration_spec.rb
|
289
|
+
- spec/dummy/.gitignore
|
290
|
+
- spec/dummy/Rakefile
|
291
|
+
- spec/dummy/app/assets/config/manifest.js
|
292
|
+
- spec/dummy/app/assets/images/.keep
|
293
|
+
- spec/dummy/app/assets/javascripts/application.js
|
294
|
+
- spec/dummy/app/assets/javascripts/cable.js
|
295
|
+
- spec/dummy/app/assets/javascripts/channels/.keep
|
296
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
297
|
+
- spec/dummy/app/channels/application_cable/channel.rb
|
298
|
+
- spec/dummy/app/channels/application_cable/connection.rb
|
299
|
+
- spec/dummy/app/controllers/application_controller.rb
|
300
|
+
- spec/dummy/app/controllers/authentication_controller.rb
|
301
|
+
- spec/dummy/app/controllers/concerns/.keep
|
302
|
+
- spec/dummy/app/helpers/application_helper.rb
|
303
|
+
- spec/dummy/app/helpers/authentication_helper.rb
|
304
|
+
- spec/dummy/app/jobs/application_job.rb
|
305
|
+
- spec/dummy/app/mailers/application_mailer.rb
|
306
|
+
- spec/dummy/app/models/application_record.rb
|
307
|
+
- spec/dummy/app/models/concerns/.keep
|
308
|
+
- spec/dummy/app/models/user.rb
|
309
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
310
|
+
- spec/dummy/app/views/layouts/mailer.html.erb
|
311
|
+
- spec/dummy/app/views/layouts/mailer.text.erb
|
312
|
+
- spec/dummy/bin/bundle
|
313
|
+
- spec/dummy/bin/rails
|
314
|
+
- spec/dummy/bin/rake
|
315
|
+
- spec/dummy/bin/setup
|
316
|
+
- spec/dummy/bin/update
|
317
|
+
- spec/dummy/bin/yarn
|
318
|
+
- spec/dummy/config.ru
|
319
|
+
- spec/dummy/config/application.rb
|
320
|
+
- spec/dummy/config/boot.rb
|
321
|
+
- spec/dummy/config/cable.yml
|
322
|
+
- spec/dummy/config/database.yml
|
323
|
+
- spec/dummy/config/environment.rb
|
324
|
+
- spec/dummy/config/environments/development.rb
|
325
|
+
- spec/dummy/config/environments/production.rb
|
326
|
+
- spec/dummy/config/environments/test.rb
|
327
|
+
- spec/dummy/config/initializers/application_controller_renderer.rb
|
328
|
+
- spec/dummy/config/initializers/assets.rb
|
329
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
330
|
+
- spec/dummy/config/initializers/cookies_serializer.rb
|
331
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
332
|
+
- spec/dummy/config/initializers/inflections.rb
|
333
|
+
- spec/dummy/config/initializers/jwt_auth.rb
|
334
|
+
- spec/dummy/config/initializers/mime_types.rb
|
335
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
336
|
+
- spec/dummy/config/locales/en.yml
|
337
|
+
- spec/dummy/config/puma.rb
|
338
|
+
- spec/dummy/config/routes.rb
|
339
|
+
- spec/dummy/config/secrets.yml
|
340
|
+
- spec/dummy/config/spring.rb
|
341
|
+
- spec/dummy/db/migrate/20170726110751_create_users.rb
|
342
|
+
- spec/dummy/db/migrate/20170726110825_add_token_version_to_user.rb
|
343
|
+
- spec/dummy/db/migrate/20170726112117_add_activated_to_user.rb
|
344
|
+
- spec/dummy/db/schema.rb
|
345
|
+
- spec/dummy/lib/assets/.keep
|
346
|
+
- spec/dummy/log/.keep
|
347
|
+
- spec/dummy/package.json
|
348
|
+
- spec/dummy/public/404.html
|
349
|
+
- spec/dummy/public/422.html
|
350
|
+
- spec/dummy/public/500.html
|
351
|
+
- spec/dummy/public/apple-touch-icon-precomposed.png
|
352
|
+
- spec/dummy/public/apple-touch-icon.png
|
353
|
+
- spec/dummy/public/favicon.ico
|
354
|
+
- spec/dummy/tmp/.keep
|
355
|
+
- spec/rails_helper.rb
|
178
356
|
- spec/spec_helper.rb
|
179
|
-
- spec/support
|
357
|
+
- spec/support/.keep
|
180
358
|
- spec/token_spec.rb
|