g5_authenticatable_api 0.4.1 → 1.0.0.pre.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 +1 -0
- data/.rspec +1 -0
- data/.ruby-version +1 -1
- data/.travis.yml +29 -8
- data/Appraisals +17 -0
- data/CHANGELOG.md +9 -0
- data/Gemfile +13 -14
- data/README.md +11 -10
- data/Rakefile +21 -1
- data/g5_authenticatable_api.gemspec +1 -1
- data/gemfiles/rails_4.1.gemfile +28 -0
- data/gemfiles/rails_4.2.gemfile +28 -0
- data/gemfiles/rails_5.0.gemfile +28 -0
- data/gemfiles/rails_5.1.gemfile +28 -0
- data/lib/g5_authenticatable_api/helpers/grape.rb +16 -5
- data/lib/g5_authenticatable_api/helpers/rails.rb +23 -6
- data/lib/g5_authenticatable_api/railtie.rb +3 -0
- data/lib/g5_authenticatable_api/services/token_info.rb +26 -10
- data/lib/g5_authenticatable_api/services/token_validator.rb +23 -20
- data/lib/g5_authenticatable_api/services/user_fetcher.rb +3 -0
- data/lib/g5_authenticatable_api/version.rb +3 -1
- data/lib/g5_authenticatable_api.rb +3 -0
- data/spec/dummy/app/controllers/rails_api/articles_controller.rb +1 -1
- data/spec/dummy/config/environments/test.rb +18 -2
- data/spec/dummy/config/initializers/rails_compatibility.rb +10 -0
- data/spec/dummy/db/migrate/20140217124048_devise_create_users.rb +4 -2
- data/spec/dummy/db/migrate/20140223194521_create_articles.rb +3 -1
- data/spec/dummy/db/schema.rb +11 -13
- data/spec/factories/user.rb +2 -0
- data/spec/lib/g5_authenticatable_api/helpers/grape_spec.rb +36 -28
- data/spec/lib/g5_authenticatable_api/helpers/rails_spec.rb +39 -33
- data/spec/lib/g5_authenticatable_api/services/token_info_spec.rb +25 -19
- data/spec/lib/g5_authenticatable_api/services/token_validator_spec.rb +20 -12
- data/spec/lib/g5_authenticatable_api/services/user_fetcher_spec.rb +5 -3
- data/spec/lib/g5_authenticatable_api/version_spec.rb +4 -2
- data/spec/rails_helper.rb +39 -0
- data/spec/requests/grape_api_spec.rb +6 -4
- data/spec/requests/rails_api_spec.rb +5 -3
- data/spec/spec_helper.rb +18 -38
- data/spec/support/controller_test_helpers.rb +26 -0
- data/spec/support/factory_girl.rb +2 -0
- data/spec/support/shared_contexts/current_auth_user.rb +8 -6
- data/spec/support/shared_contexts/invalid_access_token.rb +12 -10
- data/spec/support/shared_contexts/valid_access_token.rb +9 -7
- data/spec/support/shared_examples/auth_user.rb +3 -1
- data/spec/support/shared_examples/token_authenticatable_api.rb +9 -7
- data/spec/support/shared_examples/token_validation.rb +14 -8
- data/spec/support/shared_examples/warden_authenticatable_api.rb +8 -7
- data/spec/support/warden.rb +2 -0
- metadata +20 -10
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
ENV['RAILS_ENV'] ||= 'test'
|
6
|
+
require File.expand_path('../dummy/config/environment', __FILE__)
|
7
|
+
|
8
|
+
require 'rspec/rails'
|
9
|
+
require 'capybara/rspec'
|
10
|
+
require 'webmock/rspec'
|
11
|
+
|
12
|
+
Rails.backtrace_cleaner.remove_silencers!
|
13
|
+
|
14
|
+
# Requires supporting ruby files with custom matchers and macros, etc,
|
15
|
+
# in spec/support/ and its subdirectories.
|
16
|
+
Dir[File.expand_path('../support/**/*.rb', __FILE__)].each { |f| require f }
|
17
|
+
|
18
|
+
RSpec.configure do |config|
|
19
|
+
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
20
|
+
# examples within a transaction, remove the following line or assign false
|
21
|
+
# instead of true.
|
22
|
+
config.use_transactional_fixtures = true
|
23
|
+
|
24
|
+
# If true, the base class of anonymous controllers will be inferred
|
25
|
+
# automatically. This will be the default behavior in future versions of
|
26
|
+
# rspec-rails.
|
27
|
+
config.infer_base_class_for_anonymous_controllers = false
|
28
|
+
|
29
|
+
config.after(:suite) { WebMock.disable! }
|
30
|
+
|
31
|
+
config.infer_spec_type_from_file_location!
|
32
|
+
end
|
33
|
+
|
34
|
+
Shoulda::Matchers.configure do |config|
|
35
|
+
config.integrate do |with|
|
36
|
+
with.test_framework :rspec
|
37
|
+
with.library :rails
|
38
|
+
end
|
39
|
+
end
|
@@ -1,19 +1,21 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require 'rails_helper'
|
4
|
+
|
5
|
+
RSpec.describe 'a secure Grape API endpoint' do
|
4
6
|
let(:endpoint) { '/grape_api/hello' }
|
5
7
|
let(:params) {}
|
6
8
|
let(:headers) {}
|
7
9
|
|
8
10
|
describe 'GET request' do
|
9
|
-
subject(:api_call) {
|
11
|
+
subject(:api_call) { safe_get endpoint, params, headers }
|
10
12
|
|
11
13
|
it_should_behave_like 'a warden authenticatable api'
|
12
14
|
it_should_behave_like 'a token authenticatable api'
|
13
15
|
end
|
14
16
|
|
15
17
|
describe 'POST request' do
|
16
|
-
subject(:api_call) {
|
18
|
+
subject(:api_call) { safe_post endpoint, params, headers }
|
17
19
|
|
18
20
|
it_should_behave_like 'a warden authenticatable api'
|
19
21
|
it_should_behave_like 'a token authenticatable api'
|
@@ -1,11 +1,13 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require 'rails_helper'
|
4
|
+
|
5
|
+
RSpec.describe 'A Secure Rails API endpoint' do
|
4
6
|
let(:params) {}
|
5
7
|
let(:headers) {}
|
6
8
|
|
7
9
|
describe 'GET request' do
|
8
|
-
subject(:api_call) {
|
10
|
+
subject(:api_call) { safe_get '/rails_api/articles', params, headers }
|
9
11
|
|
10
12
|
it_should_behave_like 'a warden authenticatable api'
|
11
13
|
it_should_behave_like 'a token authenticatable api'
|
data/spec/spec_helper.rb
CHANGED
@@ -1,49 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# MUST happen before any other code is loaded
|
2
4
|
require 'simplecov'
|
3
|
-
SimpleCov.start '
|
5
|
+
SimpleCov.start 'rails'
|
4
6
|
|
5
|
-
require '
|
6
|
-
CodeClimate::TestReporter.start
|
7
|
+
require 'pry'
|
7
8
|
|
8
|
-
|
9
|
-
|
9
|
+
RSpec.configure do |config|
|
10
|
+
config.expect_with :rspec do |expectations|
|
11
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
12
|
+
end
|
10
13
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
require 'webmock/rspec'
|
14
|
+
config.mock_with :rspec do |mocks|
|
15
|
+
mocks.verify_partial_doubles = true
|
16
|
+
end
|
15
17
|
|
16
|
-
|
18
|
+
config.shared_context_metadata_behavior = :apply_to_host_groups
|
17
19
|
|
18
|
-
|
19
|
-
|
20
|
-
|
20
|
+
config.filter_run_when_matching :focus
|
21
|
+
|
22
|
+
config.disable_monkey_patching!
|
23
|
+
|
24
|
+
config.default_formatter = 'doc' if config.files_to_run.one?
|
21
25
|
|
22
|
-
RSpec.configure do |config|
|
23
|
-
# ## Mock Framework
|
24
|
-
#
|
25
|
-
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
|
26
|
-
#
|
27
|
-
# config.mock_with :mocha
|
28
|
-
# config.mock_with :flexmock
|
29
|
-
# config.mock_with :rr
|
30
|
-
config.mock_with :rspec
|
31
|
-
|
32
|
-
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
33
|
-
# examples within a transaction, remove the following line or assign false
|
34
|
-
# instead of true.
|
35
|
-
config.use_transactional_fixtures = true
|
36
|
-
|
37
|
-
# If true, the base class of anonymous controllers will be inferred
|
38
|
-
# automatically. This will be the default behavior in future versions of
|
39
|
-
# rspec-rails.
|
40
|
-
config.infer_base_class_for_anonymous_controllers = false
|
41
|
-
|
42
|
-
# Run specs in random order to surface order dependencies. If you find an
|
43
|
-
# order dependency and want to debug it, you can fix the order by providing
|
44
|
-
# the seed, which is printed after each run.
|
45
|
-
# --seed 1234
|
46
26
|
config.order = 'random'
|
47
27
|
|
48
|
-
|
28
|
+
Kernel.srand config.seed
|
49
29
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ControllerTestHelpers
|
4
|
+
def safe_get(endpoint, params = nil, headers = nil)
|
5
|
+
safe_request(:get, endpoint, params, headers)
|
6
|
+
end
|
7
|
+
|
8
|
+
def safe_post(endpoint, params = nil, headers = nil)
|
9
|
+
safe_request(:post, endpoint, params, headers)
|
10
|
+
end
|
11
|
+
|
12
|
+
def safe_request(method_name, endpoint, params = nil, headers = nil)
|
13
|
+
if Rails.version.starts_with?('4')
|
14
|
+
send(method_name, endpoint, params, headers)
|
15
|
+
else
|
16
|
+
options = { params: params }
|
17
|
+
options[:headers] = headers if headers
|
18
|
+
send(method_name, endpoint, **options)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
RSpec.configure do |config|
|
24
|
+
config.include ControllerTestHelpers, type: :controller
|
25
|
+
config.include ControllerTestHelpers, type: :request
|
26
|
+
end
|
@@ -1,10 +1,12 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec.shared_context 'current auth user' do
|
2
4
|
before do
|
3
|
-
stub_request(:get, 'auth.g5search.com/v1/me')
|
4
|
-
with(headers: {'Authorization'=>"Bearer #{token_value}"})
|
5
|
-
to_return(status: 200,
|
6
|
-
|
7
|
-
|
5
|
+
stub_request(:get, 'auth.g5search.com/v1/me')
|
6
|
+
.with(headers: { 'Authorization' => "Bearer #{token_value}" })
|
7
|
+
.to_return(status: 200,
|
8
|
+
body: raw_user_info.to_json,
|
9
|
+
headers: { 'Content-Type' => 'application/json' })
|
8
10
|
end
|
9
11
|
|
10
12
|
let(:raw_user_info) do
|
@@ -1,21 +1,23 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec.shared_context 'OAuth2 error' do
|
2
4
|
before do
|
3
|
-
stub_request(:get, 'auth.g5search.com/oauth/token/info')
|
4
|
-
with(headers: {'Authorization'=>"Bearer #{token_value}"})
|
5
|
-
to_return(status: 401,
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
stub_request(:get, 'auth.g5search.com/oauth/token/info')
|
6
|
+
.with(headers: { 'Authorization' => "Bearer #{token_value}" })
|
7
|
+
.to_return(status: 401,
|
8
|
+
headers: { 'Content-Type' => 'application/json; charset=utf-8',
|
9
|
+
'Cache-Control' => 'no-cache' },
|
10
|
+
body: parsed_error.to_json)
|
9
11
|
end
|
10
12
|
|
11
13
|
let(:parsed_error) { '' }
|
12
14
|
end
|
13
15
|
|
14
|
-
shared_context 'invalid access token' do
|
16
|
+
RSpec.shared_context 'invalid access token' do
|
15
17
|
include_context 'OAuth2 error' do
|
16
18
|
let(:parsed_error) do
|
17
|
-
{'error' => error_code,
|
18
|
-
|
19
|
+
{ 'error' => error_code,
|
20
|
+
'error_description' => error_description }
|
19
21
|
end
|
20
22
|
|
21
23
|
let(:error_code) { 'invalid_token' }
|
@@ -1,10 +1,12 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec.shared_context 'valid access token' do
|
2
4
|
before do
|
3
|
-
stub_request(:get, 'auth.g5search.com/oauth/token/info')
|
4
|
-
with(headers: {'Authorization'=>"Bearer #{token_value}"})
|
5
|
-
to_return(status: 200,
|
6
|
-
|
7
|
-
|
5
|
+
stub_request(:get, 'auth.g5search.com/oauth/token/info')
|
6
|
+
.with(headers: { 'Authorization' => "Bearer #{token_value}" })
|
7
|
+
.to_return(status: 200,
|
8
|
+
body: raw_token_info.to_json,
|
9
|
+
headers: { 'Content-Type' => 'application/json' })
|
8
10
|
end
|
9
11
|
|
10
12
|
let(:raw_token_info) do
|
@@ -12,7 +14,7 @@ shared_context 'valid access token' do
|
|
12
14
|
'resource_owner_id' => '42',
|
13
15
|
'scopes' => [],
|
14
16
|
'expires_in_seconds' => 120,
|
15
|
-
'application' => {'uid' => 'abcdefg112358'}
|
17
|
+
'application' => { 'uid' => 'abcdefg112358' }
|
16
18
|
}
|
17
19
|
end
|
18
20
|
end
|
@@ -1,14 +1,16 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec.shared_examples_for 'a token authenticatable api' do
|
2
4
|
let(:token_value) { 'abc123' }
|
3
5
|
|
4
6
|
context 'with authorization header' do
|
5
|
-
let(:headers) { {'Authorization' => "Bearer #{token_value}"} }
|
7
|
+
let(:headers) { { 'Authorization' => "Bearer #{token_value}" } }
|
6
8
|
|
7
9
|
include_examples 'token validation'
|
8
10
|
end
|
9
11
|
|
10
12
|
context 'with access token parameter' do
|
11
|
-
let(:params) { {'access_token' => token_value} }
|
13
|
+
let(:params) { { 'access_token' => token_value } }
|
12
14
|
|
13
15
|
include_examples 'token validation'
|
14
16
|
end
|
@@ -17,11 +19,11 @@ shared_examples_for 'a token authenticatable api' do
|
|
17
19
|
before { subject }
|
18
20
|
|
19
21
|
it 'should be unauthorized' do
|
20
|
-
expect(response).to
|
22
|
+
expect(response.status).to eq(401)
|
21
23
|
end
|
22
24
|
|
23
25
|
it 'should return an authenticate header without details' do
|
24
|
-
expect(response.headers
|
26
|
+
expect(response.headers['WWW-Authenticate']).to eq('Bearer')
|
25
27
|
end
|
26
28
|
end
|
27
29
|
|
@@ -39,11 +41,11 @@ shared_examples_for 'a token authenticatable api' do
|
|
39
41
|
before { subject }
|
40
42
|
|
41
43
|
it 'should be unauthorized' do
|
42
|
-
expect(response).to
|
44
|
+
expect(response.status).to eq(401)
|
43
45
|
end
|
44
46
|
|
45
47
|
it 'should return an authenticate header without details' do
|
46
|
-
expect(response.headers
|
48
|
+
expect(response.headers['WWW-Authenticate']).to eq('Bearer')
|
47
49
|
end
|
48
50
|
end
|
49
51
|
end
|
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec.shared_examples_for 'token validation' do
|
2
4
|
context 'when token is valid' do
|
3
5
|
include_context 'valid access token'
|
4
6
|
|
@@ -9,8 +11,9 @@ shared_examples_for 'token validation' do
|
|
9
11
|
end
|
10
12
|
|
11
13
|
it 'should validate the access token against the auth server' do
|
12
|
-
expect(a_request(:get, 'auth.g5search.com/oauth/token/info')
|
13
|
-
|
14
|
+
expect(a_request(:get, 'auth.g5search.com/oauth/token/info')
|
15
|
+
.with(headers: { 'Authorization' => "Bearer #{token_value}" }))
|
16
|
+
.to have_been_made
|
14
17
|
end
|
15
18
|
end
|
16
19
|
|
@@ -20,7 +23,7 @@ shared_examples_for 'token validation' do
|
|
20
23
|
before { subject }
|
21
24
|
|
22
25
|
it 'should be unauthorized' do
|
23
|
-
expect(response).to
|
26
|
+
expect(response.status).to eq(401)
|
24
27
|
end
|
25
28
|
|
26
29
|
it 'should return an authenticate header' do
|
@@ -28,11 +31,13 @@ shared_examples_for 'token validation' do
|
|
28
31
|
end
|
29
32
|
|
30
33
|
it 'should return the authentication error' do
|
31
|
-
expect(response.headers['WWW-Authenticate'])
|
34
|
+
expect(response.headers['WWW-Authenticate'])
|
35
|
+
.to match("error=\"#{error_code}\"")
|
32
36
|
end
|
33
37
|
|
34
38
|
it 'should return the authentication error description' do
|
35
|
-
expect(response.headers['WWW-Authenticate'])
|
39
|
+
expect(response.headers['WWW-Authenticate'])
|
40
|
+
.to match("error_description=\"#{error_description}\"")
|
36
41
|
end
|
37
42
|
end
|
38
43
|
|
@@ -42,7 +47,7 @@ shared_examples_for 'token validation' do
|
|
42
47
|
before { subject }
|
43
48
|
|
44
49
|
it 'should be unauthorized' do
|
45
|
-
expect(response).to
|
50
|
+
expect(response.status).to eq(401)
|
46
51
|
end
|
47
52
|
|
48
53
|
it 'should return an authenticate header' do
|
@@ -50,7 +55,8 @@ shared_examples_for 'token validation' do
|
|
50
55
|
end
|
51
56
|
|
52
57
|
it 'should return the default authentication error code' do
|
53
|
-
expect(response.headers['WWW-Authenticate'])
|
58
|
+
expect(response.headers['WWW-Authenticate'])
|
59
|
+
.to match('error="invalid_request"')
|
54
60
|
end
|
55
61
|
end
|
56
62
|
end
|
@@ -1,6 +1,6 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
shared_examples_for 'a warden authenticatable api' do
|
3
|
+
RSpec.shared_examples_for 'a warden authenticatable api' do
|
4
4
|
context 'when user is authenticated' do
|
5
5
|
let(:user) { create(:user) }
|
6
6
|
let(:token_value) { user.g5_access_token }
|
@@ -27,23 +27,24 @@ shared_examples_for 'a warden authenticatable api' do
|
|
27
27
|
end
|
28
28
|
|
29
29
|
it 'should not validate the token against the auth server' do
|
30
|
-
expect(a_request(:get, 'auth.g5search.com/oauth/token/info'))
|
30
|
+
expect(a_request(:get, 'auth.g5search.com/oauth/token/info'))
|
31
|
+
.to_not have_been_made
|
31
32
|
end
|
32
33
|
end
|
33
34
|
end
|
34
35
|
|
35
36
|
context 'when user is not authenticated' do
|
36
37
|
before do
|
37
|
-
|
38
|
-
|
38
|
+
logout
|
39
|
+
subject
|
39
40
|
end
|
40
41
|
|
41
42
|
it 'should be unauthorized' do
|
42
|
-
expect(response).to
|
43
|
+
expect(response.status).to eq(401)
|
43
44
|
end
|
44
45
|
|
45
46
|
it 'should return an authenticate header without details' do
|
46
|
-
expect(response.headers
|
47
|
+
expect(response.headers['WWW-Authenticate']).to eq('Bearer')
|
47
48
|
end
|
48
49
|
end
|
49
50
|
end
|
data/spec/support/warden.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: g5_authenticatable_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0.pre.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maeve Revels
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: g5_authentication_client
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 1.0.0.pre.4
|
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:
|
40
|
+
version: 1.0.0.pre.4
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: activesupport
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -63,12 +63,17 @@ files:
|
|
63
63
|
- ".rspec"
|
64
64
|
- ".ruby-version"
|
65
65
|
- ".travis.yml"
|
66
|
+
- Appraisals
|
66
67
|
- CHANGELOG.md
|
67
68
|
- Gemfile
|
68
69
|
- LICENSE.txt
|
69
70
|
- README.md
|
70
71
|
- Rakefile
|
71
72
|
- g5_authenticatable_api.gemspec
|
73
|
+
- gemfiles/rails_4.1.gemfile
|
74
|
+
- gemfiles/rails_4.2.gemfile
|
75
|
+
- gemfiles/rails_5.0.gemfile
|
76
|
+
- gemfiles/rails_5.1.gemfile
|
72
77
|
- lib/g5_authenticatable_api.rb
|
73
78
|
- lib/g5_authenticatable_api/helpers/grape.rb
|
74
79
|
- lib/g5_authenticatable_api/helpers/rails.rb
|
@@ -113,6 +118,7 @@ files:
|
|
113
118
|
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
114
119
|
- spec/dummy/config/initializers/inflections.rb
|
115
120
|
- spec/dummy/config/initializers/mime_types.rb
|
121
|
+
- spec/dummy/config/initializers/rails_compatibility.rb
|
116
122
|
- spec/dummy/config/initializers/secret_token.rb
|
117
123
|
- spec/dummy/config/initializers/session_store.rb
|
118
124
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
@@ -140,9 +146,11 @@ files:
|
|
140
146
|
- spec/lib/g5_authenticatable_api/services/token_validator_spec.rb
|
141
147
|
- spec/lib/g5_authenticatable_api/services/user_fetcher_spec.rb
|
142
148
|
- spec/lib/g5_authenticatable_api/version_spec.rb
|
149
|
+
- spec/rails_helper.rb
|
143
150
|
- spec/requests/grape_api_spec.rb
|
144
151
|
- spec/requests/rails_api_spec.rb
|
145
152
|
- spec/spec_helper.rb
|
153
|
+
- spec/support/controller_test_helpers.rb
|
146
154
|
- spec/support/factory_girl.rb
|
147
155
|
- spec/support/shared_contexts/current_auth_user.rb
|
148
156
|
- spec/support/shared_contexts/invalid_access_token.rb
|
@@ -167,12 +175,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
167
175
|
version: '0'
|
168
176
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
169
177
|
requirements:
|
170
|
-
- - "
|
178
|
+
- - ">"
|
171
179
|
- !ruby/object:Gem::Version
|
172
|
-
version:
|
180
|
+
version: 1.3.1
|
173
181
|
requirements: []
|
174
182
|
rubyforge_project:
|
175
|
-
rubygems_version: 2.
|
183
|
+
rubygems_version: 2.5.2
|
176
184
|
signing_key:
|
177
185
|
specification_version: 4
|
178
186
|
summary: Helpers for securing APIs with G5
|
@@ -213,6 +221,7 @@ test_files:
|
|
213
221
|
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
214
222
|
- spec/dummy/config/initializers/inflections.rb
|
215
223
|
- spec/dummy/config/initializers/mime_types.rb
|
224
|
+
- spec/dummy/config/initializers/rails_compatibility.rb
|
216
225
|
- spec/dummy/config/initializers/secret_token.rb
|
217
226
|
- spec/dummy/config/initializers/session_store.rb
|
218
227
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
@@ -240,9 +249,11 @@ test_files:
|
|
240
249
|
- spec/lib/g5_authenticatable_api/services/token_validator_spec.rb
|
241
250
|
- spec/lib/g5_authenticatable_api/services/user_fetcher_spec.rb
|
242
251
|
- spec/lib/g5_authenticatable_api/version_spec.rb
|
252
|
+
- spec/rails_helper.rb
|
243
253
|
- spec/requests/grape_api_spec.rb
|
244
254
|
- spec/requests/rails_api_spec.rb
|
245
255
|
- spec/spec_helper.rb
|
256
|
+
- spec/support/controller_test_helpers.rb
|
246
257
|
- spec/support/factory_girl.rb
|
247
258
|
- spec/support/shared_contexts/current_auth_user.rb
|
248
259
|
- spec/support/shared_contexts/invalid_access_token.rb
|
@@ -252,4 +263,3 @@ test_files:
|
|
252
263
|
- spec/support/shared_examples/token_validation.rb
|
253
264
|
- spec/support/shared_examples/warden_authenticatable_api.rb
|
254
265
|
- spec/support/warden.rb
|
255
|
-
has_rdoc:
|