KnockRails3 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +39 -0
  4. data/app/controllers/knock_rails3/application_controller.rb +11 -0
  5. data/app/controllers/knock_rails3/auth_token_controller.rb +47 -0
  6. data/app/model/knock_rails3/auth_token.rb +78 -0
  7. data/config/routes.rb +3 -0
  8. data/lib/KnockRails3.rb +31 -0
  9. data/lib/generators/knock_rails3/install_generator.rb +13 -0
  10. data/lib/generators/knock_rails3/token_controller_generator.rb +27 -0
  11. data/lib/generators/templates/entity_token_controller.rb.erb +2 -0
  12. data/lib/generators/templates/knock_rails3.rb +59 -0
  13. data/lib/knock_rails3/authenticable.rb +60 -0
  14. data/lib/knock_rails3/engine.rb +6 -0
  15. data/lib/knock_rails3/version.rb +3 -0
  16. data/lib/tasks/KnockRails3_tasks.rake +4 -0
  17. data/test/dummy/README.rdoc +28 -0
  18. data/test/dummy/Rakefile +6 -0
  19. data/test/dummy/app/assets/javascripts/application.js +13 -0
  20. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  21. data/test/dummy/app/controllers/admin_protected_controller.rb +7 -0
  22. data/test/dummy/app/controllers/admin_token_controller.rb +2 -0
  23. data/test/dummy/app/controllers/application_controller.rb +7 -0
  24. data/test/dummy/app/controllers/composite_name_entity_protected_controller.rb +7 -0
  25. data/test/dummy/app/controllers/current_users_controller.rb +9 -0
  26. data/test/dummy/app/controllers/custom_unauthorized_entity_controller.rb +13 -0
  27. data/test/dummy/app/controllers/guest_protected_controller.rb +7 -0
  28. data/test/dummy/app/controllers/protected_resources_controller.rb +7 -0
  29. data/test/dummy/app/controllers/v1/test_namespaced_controller.rb +17 -0
  30. data/test/dummy/app/controllers/vendor_protected_controller.rb +11 -0
  31. data/test/dummy/app/controllers/vendor_token_controller.rb +2 -0
  32. data/test/dummy/app/helpers/application_helper.rb +2 -0
  33. data/test/dummy/app/models/admin.rb +16 -0
  34. data/test/dummy/app/models/composite_name_entity.rb +3 -0
  35. data/test/dummy/app/models/guest.rb +7 -0
  36. data/test/dummy/app/models/user.rb +3 -0
  37. data/test/dummy/app/models/v1/user.rb +5 -0
  38. data/test/dummy/app/models/vendor.rb +3 -0
  39. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  40. data/test/dummy/bin/bundle +3 -0
  41. data/test/dummy/bin/rails +4 -0
  42. data/test/dummy/bin/rake +4 -0
  43. data/test/dummy/bin/setup +29 -0
  44. data/test/dummy/config.ru +4 -0
  45. data/test/dummy/config/application.rb +28 -0
  46. data/test/dummy/config/boot.rb +5 -0
  47. data/test/dummy/config/database.yml +25 -0
  48. data/test/dummy/config/environment.rb +5 -0
  49. data/test/dummy/config/environments/development.rb +41 -0
  50. data/test/dummy/config/environments/production.rb +79 -0
  51. data/test/dummy/config/environments/test.rb +47 -0
  52. data/test/dummy/config/initializers/assets.rb +11 -0
  53. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  54. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  55. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  56. data/test/dummy/config/initializers/inflections.rb +16 -0
  57. data/test/dummy/config/initializers/knock.rb +8 -0
  58. data/test/dummy/config/initializers/mime_types.rb +4 -0
  59. data/test/dummy/config/initializers/session_store.rb +3 -0
  60. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  61. data/test/dummy/config/locales/en.yml +23 -0
  62. data/test/dummy/config/routes.rb +17 -0
  63. data/test/dummy/config/secrets.yml +22 -0
  64. data/test/dummy/db/migrate/20150713101607_create_users.rb +10 -0
  65. data/test/dummy/db/migrate/20160519075733_create_admins.rb +10 -0
  66. data/test/dummy/db/migrate/20160522051816_create_vendors.rb +10 -0
  67. data/test/dummy/db/migrate/20160522181712_create_composite_name_entities.rb +10 -0
  68. data/test/dummy/db/migrate/20161127203222_create_v1_users.rb +12 -0
  69. data/test/dummy/db/schema.rb +50 -0
  70. data/test/dummy/public/404.html +67 -0
  71. data/test/dummy/public/422.html +67 -0
  72. data/test/dummy/public/500.html +66 -0
  73. data/test/dummy/public/favicon.ico +0 -0
  74. data/test/dummy/test/controllers/admin_protected_controller_test.rb +49 -0
  75. data/test/dummy/test/controllers/admin_token_controller_test.rb +22 -0
  76. data/test/dummy/test/controllers/composite_name_entity_protected_controller_test.rb +49 -0
  77. data/test/dummy/test/controllers/current_users_controller_test.rb +31 -0
  78. data/test/dummy/test/controllers/custom_unauthorized_entity_controller_test.rb +42 -0
  79. data/test/dummy/test/controllers/guest_protected_controller_test.rb +22 -0
  80. data/test/dummy/test/controllers/protected_resources_controller_test.rb +62 -0
  81. data/test/dummy/test/controllers/v1/test_namespaced_controller_test.rb +19 -0
  82. data/test/dummy/test/controllers/vendor_protected_controller_test.rb +55 -0
  83. data/test/dummy/test/controllers/vendor_token_controller_test.rb +22 -0
  84. data/test/dummy/test/models/admin_test.rb +7 -0
  85. data/test/dummy/test/models/user_test.rb +4 -0
  86. data/test/dummy/test/models/vendor_test.rb +7 -0
  87. data/test/fixtures/admins.yml +5 -0
  88. data/test/fixtures/composite_name_entities.yml +5 -0
  89. data/test/fixtures/users.yml +9 -0
  90. data/test/fixtures/v1_users.yml +6 -0
  91. data/test/fixtures/vendors.yml +5 -0
  92. data/test/generators/install_generator_test.rb +12 -0
  93. data/test/generators/token_controller_generator_test.rb +31 -0
  94. data/test/knock_test.rb +9 -0
  95. data/test/model/knock/auth_token_test.rb +123 -0
  96. data/test/support/generators_test_helper.rb +9 -0
  97. data/test/test_helper.rb +45 -0
  98. metadata +292 -0
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class AdminTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -0,0 +1,4 @@
1
+ require 'test_helper'
2
+
3
+ class UserTest < ActiveSupport::TestCase
4
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class VendorTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -0,0 +1,5 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2
+
3
+ one:
4
+ email: admin.one@example.net
5
+ password_digest: <%= BCrypt::Password.create('secret', cost: 4) %>
@@ -0,0 +1,5 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2
+
3
+ one:
4
+ email: composite_name_entity.one@example.net
5
+ password_digest: <%= BCrypt::Password.create('secret', cost: 4) %>
@@ -0,0 +1,9 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2
+
3
+ one:
4
+ email: one@example.net
5
+ password_digest: <%= BCrypt::Password.create('secret', cost: 4) %>
6
+
7
+ two:
8
+ email: two@example.net
9
+ password_digest: <%= BCrypt::Password.create('secret', cost: 4) %>
@@ -0,0 +1,6 @@
1
+
2
+ one:
3
+ email: v1user@example.net
4
+ password_digest: <%= BCrypt::Password.create('secret', cost: 4) %>
5
+ created_at: <%= Time.now.utc %>
6
+ updated_at: <%= Time.now.utc %>
@@ -0,0 +1,5 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2
+
3
+ one:
4
+ email: vendor.one@example.net
5
+ password_digest: <%= BCrypt::Password.create('secret', cost: 4) %>
@@ -0,0 +1,12 @@
1
+ require "test_helper"
2
+
3
+ class InstallGeneratorTest < Rails::Generators::TestCase
4
+ tests KnockRails3::InstallGenerator
5
+ destination File.expand_path("../tmp", File.dirname(__FILE__))
6
+ setup :prepare_destination
7
+
8
+ test "Assert all files are properly created" do
9
+ run_generator
10
+ assert_file "config/initializers/KnockRails3.rb"
11
+ end
12
+ end
@@ -0,0 +1,31 @@
1
+ require "test_helper"
2
+
3
+ class TokenControllerGeneratorTest < Rails::Generators::TestCase
4
+ include GeneratorsTestHelper
5
+
6
+ tests KnockRails3::TokenControllerGenerator
7
+ destination File.expand_path("../tmp", File.dirname(__FILE__))
8
+
9
+ setup :prepare_destination
10
+ setup :copy_routes
11
+
12
+ test "assert all files are properly created" do
13
+ run_generator ['User']
14
+ assert_file "app/controllers/user_token_controller.rb"
15
+
16
+ run_generator ['Admin']
17
+ assert_file "app/controllers/user_token_controller.rb"
18
+
19
+ run_generator ['AdminUser']
20
+ assert_file "app/controllers/admin_user_token_controller.rb"
21
+
22
+ require File.join(destination_root, "app/controllers/admin_user_token_controller.rb")
23
+ assert Object.const_defined?('AdminUserTokenController'), 'uninitialized constant AdminUserTokenController'
24
+
25
+ run_generator ['user_admin']
26
+ assert_file "app/controllers/user_admin_token_controller.rb"
27
+
28
+ require File.join(destination_root, "app/controllers/user_admin_token_controller.rb")
29
+ assert Object.const_defined?('UserAdminTokenController'), 'uninitialized constant UserAdminTokenController'
30
+ end
31
+ end
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+
3
+ class KnockRails3Test < ActiveSupport::TestCase
4
+ test 'setup block yields self' do
5
+ KnockRails3.setup do |config|
6
+ assert_equal KnockRails3, config
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,123 @@
1
+ require 'test_helper'
2
+ require 'jwt'
3
+ require 'timecop'
4
+
5
+ module KnockRails3
6
+ class AuthTokenTest < ActiveSupport::TestCase
7
+ setup do
8
+ key = KnockRails3.token_secret_signature_key.call
9
+ @token = JWT.encode({sub: '1'}, key, 'HS256')
10
+ end
11
+
12
+ test "verify algorithm" do
13
+ KnockRails3.token_signature_algorithm = 'RS256'
14
+
15
+ assert_raises(JWT::IncorrectAlgorithm) {
16
+ AuthToken.new(token: @token)
17
+ }
18
+ end
19
+
20
+ test "decode RSA encoded tokens" do
21
+ rsa_private = OpenSSL::PKey::RSA.generate 2048
22
+ KnockRails3.token_public_key = rsa_private.public_key
23
+ KnockRails3.token_signature_algorithm = 'RS256'
24
+
25
+ token = JWT.encode({sub: "1"}, rsa_private, 'RS256')
26
+
27
+ assert_nothing_raised { AuthToken.new(token: token) }
28
+ end
29
+
30
+ test "encode tokens with RSA" do
31
+ rsa_private = OpenSSL::PKey::RSA.generate 2048
32
+ KnockRails3.token_secret_signature_key = -> { rsa_private }
33
+ KnockRails3.token_signature_algorithm = 'RS256'
34
+
35
+ token = AuthToken.new(payload: {sub: '1'}).token
36
+
37
+ payload, header = JWT.decode token, rsa_private.public_key, true
38
+ assert_equal payload['sub'], '1'
39
+ assert_equal header['alg'], 'RS256'
40
+ end
41
+
42
+ test "verify audience when token_audience is present" do
43
+ KnockRails3.token_audience = -> { 'bar' }
44
+
45
+ assert_raises(JWT::InvalidAudError) {
46
+ AuthToken.new token: @token
47
+ }
48
+ end
49
+
50
+ test "validate expiration claim by default" do
51
+ token = AuthToken.new(payload: {sub: 'foo'}).token
52
+ Timecop.travel(25.hours.from_now) do
53
+ assert_raises(JWT::ExpiredSignature) {
54
+ AuthToken.new(token: token)
55
+ }
56
+ end
57
+ end
58
+
59
+ test "does not validate expiration claim with a nil token_lifetime" do
60
+ KnockRails3.token_lifetime = nil
61
+
62
+ token = AuthToken.new(payload: {sub: 'foo'}).token
63
+ Timecop.travel(10.years.from_now) do
64
+ assert_not AuthToken.new(token: token).payload.has_key?('exp')
65
+ end
66
+ end
67
+
68
+ test "validate aud when verify_options[:verify_aud] is true" do
69
+ verify_options = {
70
+ verify_aud: true
71
+ }
72
+ KnockRails3.token_audience = -> { 'bar' }
73
+ key = KnockRails3.token_secret_signature_key.call
74
+ assert_raises(JWT::InvalidAudError) {
75
+ AuthToken.new token: @token, verify_options: verify_options
76
+ }
77
+ end
78
+
79
+ test "does not validate aud when verify_options[:verify_aud] is false" do
80
+ verify_options = {
81
+ verify_aud: false
82
+ }
83
+ KnockRails3.token_audience = -> { 'bar' }
84
+ key = KnockRails3.token_secret_signature_key.call
85
+ assert_not AuthToken.new(token: @token, verify_options: verify_options).payload.has_key?('aud')
86
+ end
87
+
88
+ test "validate expiration when verify_options[:verify_expiration] is true" do
89
+ verify_options = {
90
+ verify_expiration: true
91
+ }
92
+ token = AuthToken.new(payload: {sub: 'foo'}).token
93
+ Timecop.travel(25.hours.from_now) do
94
+ assert_raises(JWT::ExpiredSignature) {
95
+ AuthToken.new(token: token, verify_options: verify_options)
96
+ }
97
+ end
98
+ end
99
+
100
+ test "does not validate expiration when verify_options[:verify_expiration] is false" do
101
+ verify_options = {
102
+ verify_expiration: false
103
+ }
104
+ token = AuthToken.new(payload: {sub: 'foo'}).token
105
+ Timecop.travel(25.hours.from_now) do
106
+ assert AuthToken.new(token: token, verify_options: verify_options).payload.has_key?('exp')
107
+ end
108
+ end
109
+
110
+ test "KnockRails3::AuthToken has all payloads" do
111
+ KnockRails3.token_lifetime = 7.days
112
+ payload = KnockRails3::AuthToken.new(payload: { sub: 'foo' }).payload
113
+ assert payload.has_key?(:sub)
114
+ assert payload.has_key?(:exp)
115
+ end
116
+
117
+ test "is serializable" do
118
+ auth_token = AuthToken.new token: @token
119
+
120
+ assert_equal("{\"jwt\":\"#{@token}\"}", auth_token.to_json)
121
+ end
122
+ end
123
+ end
@@ -0,0 +1,9 @@
1
+ module GeneratorsTestHelper
2
+ def copy_routes
3
+ routes = File.expand_path("../../dummy/config/routes.rb", __FILE__)
4
+ destination = File.join(destination_root, "config")
5
+
6
+ FileUtils.mkdir_p(destination)
7
+ FileUtils.cp routes, destination
8
+ end
9
+ end
@@ -0,0 +1,45 @@
1
+ require 'simplecov'
2
+
3
+ SimpleCov.start
4
+
5
+ # Configure Rails Environment
6
+ ENV["RAILS_ENV"] = "test"
7
+
8
+ require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
9
+ ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
10
+ ActiveRecord::Migrator.migrations_paths << File.expand_path('../../db/migrate', __FILE__)
11
+ require "rails/test_help"
12
+
13
+ # Filter out Minitest backtrace while allowing backtrace from other libraries
14
+ # to be shown.
15
+ Minitest.backtrace_filter = Minitest::BacktraceFilter.new
16
+
17
+ # Load support files
18
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
19
+
20
+ # Load fixtures from the engine
21
+ if ActiveSupport::TestCase.respond_to?(:fixture_path=)
22
+ ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
23
+ ActiveSupport::TestCase.fixtures :all
24
+ end
25
+
26
+ module KnockRails3
27
+ class MyCustomException < StandardError
28
+ end
29
+ end
30
+
31
+ # Make sure KnockRails3 global configuration is reset before every tests
32
+ # to avoid order dependent failures.
33
+ class ActiveSupport::TestCase
34
+ setup :reset_KnockRails3_configuration
35
+
36
+ private
37
+
38
+ def reset_KnockRails3_configuration
39
+ KnockRails3.token_signature_algorithm = 'HS256'
40
+ KnockRails3.token_secret_signature_key = -> { Rails.application.secrets.secret_key_base }
41
+ KnockRails3.token_public_key = nil
42
+ KnockRails3.token_audience = nil
43
+ KnockRails3.token_lifetime = 1.day
44
+ end
45
+ end
metadata ADDED
@@ -0,0 +1,292 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: KnockRails3
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Hussein
8
+ - Rudy
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2017-10-15 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - '='
19
+ - !ruby/object:Gem::Version
20
+ version: 3.2.22.1
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - '='
26
+ - !ruby/object:Gem::Version
27
+ version: 3.2.22.1
28
+ - !ruby/object:Gem::Dependency
29
+ name: jwt
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: '1.5'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '1.5'
42
+ - !ruby/object:Gem::Dependency
43
+ name: bcrypt
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '3.1'
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '3.1'
56
+ - !ruby/object:Gem::Dependency
57
+ name: sqlite3
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '1.3'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '1.3'
70
+ - !ruby/object:Gem::Dependency
71
+ name: timecop
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - "~>"
75
+ - !ruby/object:Gem::Version
76
+ version: 0.8.0
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: 0.8.0
84
+ description: Authentication solution for Rails 3 based on JWT
85
+ email:
86
+ - engineering@lynks.com
87
+ executables: []
88
+ extensions: []
89
+ extra_rdoc_files: []
90
+ files:
91
+ - MIT-LICENSE
92
+ - Rakefile
93
+ - app/controllers/knock_rails3/application_controller.rb
94
+ - app/controllers/knock_rails3/auth_token_controller.rb
95
+ - app/model/knock_rails3/auth_token.rb
96
+ - config/routes.rb
97
+ - lib/KnockRails3.rb
98
+ - lib/generators/knock_rails3/install_generator.rb
99
+ - lib/generators/knock_rails3/token_controller_generator.rb
100
+ - lib/generators/templates/entity_token_controller.rb.erb
101
+ - lib/generators/templates/knock_rails3.rb
102
+ - lib/knock_rails3/authenticable.rb
103
+ - lib/knock_rails3/engine.rb
104
+ - lib/knock_rails3/version.rb
105
+ - lib/tasks/KnockRails3_tasks.rake
106
+ - test/dummy/README.rdoc
107
+ - test/dummy/Rakefile
108
+ - test/dummy/app/assets/javascripts/application.js
109
+ - test/dummy/app/assets/stylesheets/application.css
110
+ - test/dummy/app/controllers/admin_protected_controller.rb
111
+ - test/dummy/app/controllers/admin_token_controller.rb
112
+ - test/dummy/app/controllers/application_controller.rb
113
+ - test/dummy/app/controllers/composite_name_entity_protected_controller.rb
114
+ - test/dummy/app/controllers/current_users_controller.rb
115
+ - test/dummy/app/controllers/custom_unauthorized_entity_controller.rb
116
+ - test/dummy/app/controllers/guest_protected_controller.rb
117
+ - test/dummy/app/controllers/protected_resources_controller.rb
118
+ - test/dummy/app/controllers/v1/test_namespaced_controller.rb
119
+ - test/dummy/app/controllers/vendor_protected_controller.rb
120
+ - test/dummy/app/controllers/vendor_token_controller.rb
121
+ - test/dummy/app/helpers/application_helper.rb
122
+ - test/dummy/app/models/admin.rb
123
+ - test/dummy/app/models/composite_name_entity.rb
124
+ - test/dummy/app/models/guest.rb
125
+ - test/dummy/app/models/user.rb
126
+ - test/dummy/app/models/v1/user.rb
127
+ - test/dummy/app/models/vendor.rb
128
+ - test/dummy/app/views/layouts/application.html.erb
129
+ - test/dummy/bin/bundle
130
+ - test/dummy/bin/rails
131
+ - test/dummy/bin/rake
132
+ - test/dummy/bin/setup
133
+ - test/dummy/config.ru
134
+ - test/dummy/config/application.rb
135
+ - test/dummy/config/boot.rb
136
+ - test/dummy/config/database.yml
137
+ - test/dummy/config/environment.rb
138
+ - test/dummy/config/environments/development.rb
139
+ - test/dummy/config/environments/production.rb
140
+ - test/dummy/config/environments/test.rb
141
+ - test/dummy/config/initializers/assets.rb
142
+ - test/dummy/config/initializers/backtrace_silencers.rb
143
+ - test/dummy/config/initializers/cookies_serializer.rb
144
+ - test/dummy/config/initializers/filter_parameter_logging.rb
145
+ - test/dummy/config/initializers/inflections.rb
146
+ - test/dummy/config/initializers/knock.rb
147
+ - test/dummy/config/initializers/mime_types.rb
148
+ - test/dummy/config/initializers/session_store.rb
149
+ - test/dummy/config/initializers/wrap_parameters.rb
150
+ - test/dummy/config/locales/en.yml
151
+ - test/dummy/config/routes.rb
152
+ - test/dummy/config/secrets.yml
153
+ - test/dummy/db/migrate/20150713101607_create_users.rb
154
+ - test/dummy/db/migrate/20160519075733_create_admins.rb
155
+ - test/dummy/db/migrate/20160522051816_create_vendors.rb
156
+ - test/dummy/db/migrate/20160522181712_create_composite_name_entities.rb
157
+ - test/dummy/db/migrate/20161127203222_create_v1_users.rb
158
+ - test/dummy/db/schema.rb
159
+ - test/dummy/public/404.html
160
+ - test/dummy/public/422.html
161
+ - test/dummy/public/500.html
162
+ - test/dummy/public/favicon.ico
163
+ - test/dummy/test/controllers/admin_protected_controller_test.rb
164
+ - test/dummy/test/controllers/admin_token_controller_test.rb
165
+ - test/dummy/test/controllers/composite_name_entity_protected_controller_test.rb
166
+ - test/dummy/test/controllers/current_users_controller_test.rb
167
+ - test/dummy/test/controllers/custom_unauthorized_entity_controller_test.rb
168
+ - test/dummy/test/controllers/guest_protected_controller_test.rb
169
+ - test/dummy/test/controllers/protected_resources_controller_test.rb
170
+ - test/dummy/test/controllers/v1/test_namespaced_controller_test.rb
171
+ - test/dummy/test/controllers/vendor_protected_controller_test.rb
172
+ - test/dummy/test/controllers/vendor_token_controller_test.rb
173
+ - test/dummy/test/models/admin_test.rb
174
+ - test/dummy/test/models/user_test.rb
175
+ - test/dummy/test/models/vendor_test.rb
176
+ - test/fixtures/admins.yml
177
+ - test/fixtures/composite_name_entities.yml
178
+ - test/fixtures/users.yml
179
+ - test/fixtures/v1_users.yml
180
+ - test/fixtures/vendors.yml
181
+ - test/generators/install_generator_test.rb
182
+ - test/generators/token_controller_generator_test.rb
183
+ - test/knock_test.rb
184
+ - test/model/knock/auth_token_test.rb
185
+ - test/support/generators_test_helper.rb
186
+ - test/test_helper.rb
187
+ homepage: https://github.com/Lynks/Knock-rails3
188
+ licenses:
189
+ - MIT
190
+ metadata: {}
191
+ post_install_message:
192
+ rdoc_options: []
193
+ require_paths:
194
+ - lib
195
+ required_ruby_version: !ruby/object:Gem::Requirement
196
+ requirements:
197
+ - - ">="
198
+ - !ruby/object:Gem::Version
199
+ version: '0'
200
+ required_rubygems_version: !ruby/object:Gem::Requirement
201
+ requirements:
202
+ - - ">="
203
+ - !ruby/object:Gem::Version
204
+ version: '0'
205
+ requirements: []
206
+ rubyforge_project:
207
+ rubygems_version: 2.6.12
208
+ signing_key:
209
+ specification_version: 4
210
+ summary: Seamless JWT authentication for Rails 3 API.
211
+ test_files:
212
+ - test/support/generators_test_helper.rb
213
+ - test/test_helper.rb
214
+ - test/model/knock/auth_token_test.rb
215
+ - test/dummy/README.rdoc
216
+ - test/dummy/public/500.html
217
+ - test/dummy/public/422.html
218
+ - test/dummy/public/404.html
219
+ - test/dummy/public/favicon.ico
220
+ - test/dummy/app/controllers/guest_protected_controller.rb
221
+ - test/dummy/app/controllers/composite_name_entity_protected_controller.rb
222
+ - test/dummy/app/controllers/v1/test_namespaced_controller.rb
223
+ - test/dummy/app/controllers/admin_protected_controller.rb
224
+ - test/dummy/app/controllers/application_controller.rb
225
+ - test/dummy/app/controllers/vendor_token_controller.rb
226
+ - test/dummy/app/controllers/admin_token_controller.rb
227
+ - test/dummy/app/controllers/vendor_protected_controller.rb
228
+ - test/dummy/app/controllers/current_users_controller.rb
229
+ - test/dummy/app/controllers/protected_resources_controller.rb
230
+ - test/dummy/app/controllers/custom_unauthorized_entity_controller.rb
231
+ - test/dummy/app/models/composite_name_entity.rb
232
+ - test/dummy/app/models/admin.rb
233
+ - test/dummy/app/models/user.rb
234
+ - test/dummy/app/models/v1/user.rb
235
+ - test/dummy/app/models/guest.rb
236
+ - test/dummy/app/models/vendor.rb
237
+ - test/dummy/app/views/layouts/application.html.erb
238
+ - test/dummy/app/helpers/application_helper.rb
239
+ - test/dummy/app/assets/javascripts/application.js
240
+ - test/dummy/app/assets/stylesheets/application.css
241
+ - test/dummy/test/controllers/guest_protected_controller_test.rb
242
+ - test/dummy/test/controllers/vendor_token_controller_test.rb
243
+ - test/dummy/test/controllers/protected_resources_controller_test.rb
244
+ - test/dummy/test/controllers/composite_name_entity_protected_controller_test.rb
245
+ - test/dummy/test/controllers/v1/test_namespaced_controller_test.rb
246
+ - test/dummy/test/controllers/admin_token_controller_test.rb
247
+ - test/dummy/test/controllers/vendor_protected_controller_test.rb
248
+ - test/dummy/test/controllers/current_users_controller_test.rb
249
+ - test/dummy/test/controllers/admin_protected_controller_test.rb
250
+ - test/dummy/test/controllers/custom_unauthorized_entity_controller_test.rb
251
+ - test/dummy/test/models/user_test.rb
252
+ - test/dummy/test/models/vendor_test.rb
253
+ - test/dummy/test/models/admin_test.rb
254
+ - test/dummy/db/schema.rb
255
+ - test/dummy/db/migrate/20160519075733_create_admins.rb
256
+ - test/dummy/db/migrate/20160522051816_create_vendors.rb
257
+ - test/dummy/db/migrate/20150713101607_create_users.rb
258
+ - test/dummy/db/migrate/20160522181712_create_composite_name_entities.rb
259
+ - test/dummy/db/migrate/20161127203222_create_v1_users.rb
260
+ - test/dummy/config.ru
261
+ - test/dummy/config/environments/production.rb
262
+ - test/dummy/config/environments/test.rb
263
+ - test/dummy/config/environments/development.rb
264
+ - test/dummy/config/boot.rb
265
+ - test/dummy/config/locales/en.yml
266
+ - test/dummy/config/environment.rb
267
+ - test/dummy/config/routes.rb
268
+ - test/dummy/config/secrets.yml
269
+ - test/dummy/config/initializers/cookies_serializer.rb
270
+ - test/dummy/config/initializers/backtrace_silencers.rb
271
+ - test/dummy/config/initializers/session_store.rb
272
+ - test/dummy/config/initializers/knock.rb
273
+ - test/dummy/config/initializers/wrap_parameters.rb
274
+ - test/dummy/config/initializers/filter_parameter_logging.rb
275
+ - test/dummy/config/initializers/mime_types.rb
276
+ - test/dummy/config/initializers/inflections.rb
277
+ - test/dummy/config/initializers/assets.rb
278
+ - test/dummy/config/database.yml
279
+ - test/dummy/config/application.rb
280
+ - test/dummy/Rakefile
281
+ - test/dummy/bin/rails
282
+ - test/dummy/bin/bundle
283
+ - test/dummy/bin/rake
284
+ - test/dummy/bin/setup
285
+ - test/knock_test.rb
286
+ - test/generators/install_generator_test.rb
287
+ - test/generators/token_controller_generator_test.rb
288
+ - test/fixtures/composite_name_entities.yml
289
+ - test/fixtures/v1_users.yml
290
+ - test/fixtures/users.yml
291
+ - test/fixtures/vendors.yml
292
+ - test/fixtures/admins.yml