doorkeeper 5.0.3 → 5.1.0
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/.hound.yml +2 -1
- data/.rubocop.yml +37 -4
- data/.travis.yml +11 -21
- data/Appraisals +29 -7
- data/Dangerfile +5 -2
- data/Gemfile +19 -5
- data/NEWS.md +81 -21
- data/README.md +75 -485
- data/Rakefile +10 -8
- data/app/controllers/doorkeeper/application_controller.rb +1 -2
- data/app/controllers/doorkeeper/application_metal_controller.rb +2 -13
- data/app/controllers/doorkeeper/applications_controller.rb +20 -8
- data/app/controllers/doorkeeper/authorized_applications_controller.rb +1 -1
- data/app/controllers/doorkeeper/token_info_controller.rb +2 -2
- data/app/controllers/doorkeeper/tokens_controller.rb +11 -11
- data/app/helpers/doorkeeper/dashboard_helper.rb +1 -1
- data/app/validators/redirect_uri_validator.rb +5 -2
- data/app/views/doorkeeper/applications/_form.html.erb +6 -0
- data/app/views/doorkeeper/applications/show.html.erb +1 -1
- data/app/views/layouts/doorkeeper/admin.html.erb +5 -3
- data/bin/console +16 -0
- data/config/locales/en.yml +1 -0
- data/doorkeeper.gemspec +24 -21
- data/gemfiles/rails_5_0.gemfile +9 -4
- data/gemfiles/rails_5_1.gemfile +9 -4
- data/gemfiles/rails_5_2.gemfile +10 -5
- data/gemfiles/rails_6_0.gemfile +17 -0
- data/gemfiles/rails_master.gemfile +9 -9
- data/lib/doorkeeper/config/option.rb +64 -0
- data/lib/doorkeeper/config.rb +191 -75
- data/lib/doorkeeper/engine.rb +1 -1
- data/lib/doorkeeper/grape/authorization_decorator.rb +4 -4
- data/lib/doorkeeper/grape/helpers.rb +3 -3
- data/lib/doorkeeper/helpers/controller.rb +3 -2
- data/lib/doorkeeper/models/access_grant_mixin.rb +20 -3
- data/lib/doorkeeper/models/access_token_mixin.rb +63 -19
- data/lib/doorkeeper/models/application_mixin.rb +43 -1
- data/lib/doorkeeper/models/concerns/expirable.rb +4 -2
- data/lib/doorkeeper/models/concerns/ownership.rb +1 -6
- data/lib/doorkeeper/models/concerns/reusable.rb +19 -0
- data/lib/doorkeeper/models/concerns/revocable.rb +2 -1
- data/lib/doorkeeper/models/concerns/scopes.rb +5 -1
- data/lib/doorkeeper/models/concerns/secret_storable.rb +108 -0
- data/lib/doorkeeper/oauth/authorization/code.rb +2 -2
- data/lib/doorkeeper/oauth/authorization/token.rb +12 -7
- data/lib/doorkeeper/oauth/authorization/uri_builder.rb +1 -1
- data/lib/doorkeeper/oauth/authorization_code_request.rb +6 -4
- data/lib/doorkeeper/oauth/client.rb +1 -1
- data/lib/doorkeeper/oauth/client_credentials/validation.rb +5 -4
- data/lib/doorkeeper/oauth/client_credentials_request.rb +1 -1
- data/lib/doorkeeper/oauth/code_response.rb +2 -2
- data/lib/doorkeeper/oauth/error_response.rb +10 -6
- data/lib/doorkeeper/oauth/forbidden_token_response.rb +1 -1
- data/lib/doorkeeper/oauth/helpers/scope_checker.rb +23 -8
- data/lib/doorkeeper/oauth/helpers/unique_token.rb +13 -1
- data/lib/doorkeeper/oauth/helpers/uri_checker.rb +37 -1
- data/lib/doorkeeper/oauth/invalid_token_response.rb +5 -1
- data/lib/doorkeeper/oauth/password_access_token_request.rb +7 -2
- data/lib/doorkeeper/oauth/pre_authorization.rb +11 -5
- data/lib/doorkeeper/oauth/refresh_token_request.rb +5 -2
- data/lib/doorkeeper/oauth/scopes.rb +5 -3
- data/lib/doorkeeper/oauth/token.rb +2 -2
- data/lib/doorkeeper/oauth/token_introspection.rb +74 -8
- data/lib/doorkeeper/oauth/token_response.rb +9 -9
- data/lib/doorkeeper/oauth.rb +5 -5
- data/lib/doorkeeper/orm/active_record/access_grant.rb +27 -13
- data/lib/doorkeeper/orm/active_record/access_token.rb +6 -13
- data/lib/doorkeeper/orm/active_record/application.rb +21 -57
- data/lib/doorkeeper/orm/active_record/stale_records_cleaner.rb +10 -3
- data/lib/doorkeeper/orm/active_record.rb +6 -6
- data/lib/doorkeeper/rails/helpers.rb +1 -1
- data/lib/doorkeeper/rails/routes/mapping.rb +7 -7
- data/lib/doorkeeper/rails/routes.rb +11 -11
- data/lib/doorkeeper/rake/db.rake +13 -13
- data/lib/doorkeeper/rake.rb +1 -1
- data/lib/doorkeeper/request.rb +1 -1
- data/lib/doorkeeper/secret_storing/base.rb +64 -0
- data/lib/doorkeeper/secret_storing/bcrypt.rb +60 -0
- data/lib/doorkeeper/secret_storing/plain.rb +33 -0
- data/lib/doorkeeper/secret_storing/sha256_hash.rb +26 -0
- data/lib/doorkeeper/stale_records_cleaner.rb +1 -1
- data/lib/doorkeeper/version.rb +3 -3
- data/lib/doorkeeper.rb +69 -60
- data/lib/generators/doorkeeper/application_owner_generator.rb +10 -9
- data/lib/generators/doorkeeper/confidential_applications_generator.rb +10 -9
- data/lib/generators/doorkeeper/install_generator.rb +11 -9
- data/lib/generators/doorkeeper/migration_generator.rb +9 -9
- data/lib/generators/doorkeeper/pkce_generator.rb +10 -9
- data/lib/generators/doorkeeper/previous_refresh_token_generator.rb +10 -9
- data/lib/generators/doorkeeper/templates/initializer.rb +120 -13
- data/lib/generators/doorkeeper/templates/migration.rb.erb +15 -7
- data/lib/generators/doorkeeper/views_generator.rb +6 -4
- data/spec/controllers/application_metal_controller_spec.rb +24 -10
- data/spec/controllers/applications_controller_spec.rb +54 -52
- data/spec/controllers/authorizations_controller_spec.rb +139 -145
- data/spec/controllers/protected_resources_controller_spec.rb +78 -76
- data/spec/controllers/token_info_controller_spec.rb +14 -12
- data/spec/controllers/tokens_controller_spec.rb +167 -108
- data/spec/dummy/Rakefile +3 -1
- data/spec/dummy/app/controllers/application_controller.rb +3 -1
- data/spec/dummy/app/controllers/custom_authorizations_controller.rb +2 -0
- data/spec/dummy/app/controllers/full_protected_resources_controller.rb +4 -2
- data/spec/dummy/app/controllers/home_controller.rb +5 -3
- data/spec/dummy/app/controllers/metal_controller.rb +2 -0
- data/spec/dummy/app/controllers/semi_protected_resources_controller.rb +4 -2
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/models/user.rb +2 -0
- data/spec/dummy/config/application.rb +25 -1
- data/spec/dummy/config/environments/development.rb +2 -0
- data/spec/dummy/config/environments/production.rb +2 -0
- data/spec/dummy/config/environments/test.rb +3 -1
- data/spec/dummy/config/initializers/backtrace_silencers.rb +2 -0
- data/spec/dummy/config/initializers/doorkeeper.rb +5 -2
- data/spec/dummy/config/initializers/secret_token.rb +3 -1
- data/spec/dummy/config/initializers/session_store.rb +3 -1
- data/spec/dummy/config/initializers/wrap_parameters.rb +2 -0
- data/spec/dummy/config.ru +3 -1
- data/spec/dummy/db/migrate/20151223192035_create_doorkeeper_tables.rb +17 -10
- data/spec/dummy/db/migrate/20170822064514_enable_pkce.rb +2 -0
- data/spec/dummy/db/schema.rb +1 -1
- data/spec/dummy/script/rails +5 -3
- data/spec/factories.rb +8 -6
- data/spec/generators/application_owner_generator_spec.rb +13 -26
- data/spec/generators/confidential_applications_generator_spec.rb +12 -28
- data/spec/generators/install_generator_spec.rb +17 -15
- data/spec/generators/migration_generator_spec.rb +13 -26
- data/spec/generators/pkce_generator_spec.rb +11 -26
- data/spec/generators/previous_refresh_token_generator_spec.rb +16 -29
- data/spec/generators/templates/routes.rb +2 -0
- data/spec/generators/views_generator_spec.rb +14 -12
- data/spec/grape/grape_integration_spec.rb +34 -32
- data/spec/helpers/doorkeeper/dashboard_helper_spec.rb +9 -7
- data/spec/lib/config_spec.rb +268 -99
- data/spec/lib/doorkeeper_spec.rb +3 -1
- data/spec/lib/models/expirable_spec.rb +22 -8
- data/spec/lib/models/reusable_spec.rb +40 -0
- data/spec/lib/models/revocable_spec.rb +8 -6
- data/spec/lib/models/scopes_spec.rb +27 -13
- data/spec/lib/models/secret_storable_spec.rb +135 -0
- data/spec/lib/oauth/authorization/uri_builder_spec.rb +17 -15
- data/spec/lib/oauth/authorization_code_request_spec.rb +34 -11
- data/spec/lib/oauth/base_request_spec.rb +20 -8
- data/spec/lib/oauth/base_response_spec.rb +3 -1
- data/spec/lib/oauth/client/credentials_spec.rb +24 -22
- data/spec/lib/oauth/client_credentials/creator_spec.rb +56 -10
- data/spec/lib/oauth/client_credentials/issuer_spec.rb +27 -18
- data/spec/lib/oauth/client_credentials/validation_spec.rb +20 -15
- data/spec/lib/oauth/client_credentials_integration_spec.rb +7 -5
- data/spec/lib/oauth/client_credentials_request_spec.rb +27 -21
- data/spec/lib/oauth/client_spec.rb +15 -13
- data/spec/lib/oauth/code_request_spec.rb +8 -6
- data/spec/lib/oauth/code_response_spec.rb +9 -7
- data/spec/lib/oauth/error_response_spec.rb +19 -11
- data/spec/lib/oauth/error_spec.rb +4 -2
- data/spec/lib/oauth/forbidden_token_response_spec.rb +7 -5
- data/spec/lib/oauth/helpers/scope_checker_spec.rb +68 -31
- data/spec/lib/oauth/helpers/unique_token_spec.rb +8 -6
- data/spec/lib/oauth/helpers/uri_checker_spec.rb +115 -95
- data/spec/lib/oauth/invalid_token_response_spec.rb +3 -1
- data/spec/lib/oauth/password_access_token_request_spec.rb +79 -30
- data/spec/lib/oauth/pre_authorization_spec.rb +80 -54
- data/spec/lib/oauth/refresh_token_request_spec.rb +36 -33
- data/spec/lib/oauth/scopes_spec.rb +63 -61
- data/spec/lib/oauth/token_request_spec.rb +79 -24
- data/spec/lib/oauth/token_response_spec.rb +40 -38
- data/spec/lib/oauth/token_spec.rb +60 -44
- data/spec/lib/request/strategy_spec.rb +3 -1
- data/spec/lib/secret_storing/base_spec.rb +60 -0
- data/spec/lib/secret_storing/bcrypt_spec.rb +49 -0
- data/spec/lib/secret_storing/plain_spec.rb +44 -0
- data/spec/lib/secret_storing/sha256_hash_spec.rb +48 -0
- data/spec/lib/server_spec.rb +16 -14
- data/spec/lib/stale_records_cleaner_spec.rb +17 -17
- data/spec/models/doorkeeper/access_grant_spec.rb +80 -15
- data/spec/models/doorkeeper/access_token_spec.rb +198 -73
- data/spec/models/doorkeeper/application_spec.rb +280 -288
- data/spec/requests/applications/applications_request_spec.rb +98 -66
- data/spec/requests/applications/authorized_applications_spec.rb +20 -18
- data/spec/requests/endpoints/authorization_spec.rb +25 -23
- data/spec/requests/endpoints/token_spec.rb +38 -36
- data/spec/requests/flows/authorization_code_errors_spec.rb +26 -24
- data/spec/requests/flows/authorization_code_spec.rb +193 -151
- data/spec/requests/flows/client_credentials_spec.rb +54 -52
- data/spec/requests/flows/implicit_grant_errors_spec.rb +10 -8
- data/spec/requests/flows/implicit_grant_spec.rb +27 -25
- data/spec/requests/flows/password_spec.rb +59 -55
- data/spec/requests/flows/refresh_token_spec.rb +45 -43
- data/spec/requests/flows/revoke_token_spec.rb +40 -54
- data/spec/requests/flows/skip_authorization_spec.rb +23 -21
- data/spec/requests/protected_resources/metal_spec.rb +7 -5
- data/spec/requests/protected_resources/private_api_spec.rb +35 -33
- data/spec/routing/custom_controller_routes_spec.rb +71 -65
- data/spec/routing/default_routes_spec.rb +22 -20
- data/spec/routing/scoped_routes_spec.rb +20 -18
- data/spec/spec_helper.rb +15 -13
- data/spec/spec_helper_integration.rb +3 -1
- data/spec/support/dependencies/factory_bot.rb +3 -1
- data/spec/support/doorkeeper_rspec.rb +3 -1
- data/spec/support/helpers/access_token_request_helper.rb +3 -1
- data/spec/support/helpers/authorization_request_helper.rb +4 -2
- data/spec/support/helpers/config_helper.rb +2 -0
- data/spec/support/helpers/model_helper.rb +3 -1
- data/spec/support/helpers/request_spec_helper.rb +5 -3
- data/spec/support/helpers/url_helper.rb +9 -7
- data/spec/support/http_method_shim.rb +4 -9
- data/spec/support/orm/active_record.rb +3 -1
- data/spec/support/shared/controllers_shared_context.rb +18 -16
- data/spec/support/shared/hashing_shared_context.rb +36 -0
- data/spec/support/shared/models_shared_examples.rb +12 -10
- data/spec/validators/redirect_uri_validator_spec.rb +74 -45
- data/spec/version/version_spec.rb +7 -5
- metadata +60 -26
- data/gemfiles/rails_4_2.gemfile +0 -13
- data/spec/dummy/config/initializers/new_framework_defaults.rb +0 -8
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
shared_context "valid token", token: :valid do
|
|
4
|
+
let(:token_string) { "1A2B3C4D" }
|
|
3
5
|
|
|
4
6
|
let :token do
|
|
5
7
|
double(Doorkeeper::AccessToken,
|
|
@@ -14,8 +16,8 @@ shared_context 'valid token', token: :valid do
|
|
|
14
16
|
end
|
|
15
17
|
end
|
|
16
18
|
|
|
17
|
-
shared_context
|
|
18
|
-
let(:token_string) {
|
|
19
|
+
shared_context "invalid token", token: :invalid do
|
|
20
|
+
let(:token_string) { "1A2B3C4D" }
|
|
19
21
|
|
|
20
22
|
let :token do
|
|
21
23
|
double(Doorkeeper::AccessToken,
|
|
@@ -31,22 +33,22 @@ shared_context 'invalid token', token: :invalid do
|
|
|
31
33
|
end
|
|
32
34
|
end
|
|
33
35
|
|
|
34
|
-
shared_context
|
|
36
|
+
shared_context "authenticated resource owner" do
|
|
35
37
|
before do
|
|
36
38
|
user = double(:resource, id: 1)
|
|
37
39
|
allow(Doorkeeper.configuration).to receive(:authenticate_resource_owner) { proc { user } }
|
|
38
40
|
end
|
|
39
41
|
end
|
|
40
42
|
|
|
41
|
-
shared_context
|
|
43
|
+
shared_context "not authenticated resource owner" do
|
|
42
44
|
before do
|
|
43
|
-
allow(Doorkeeper.configuration).to receive(:authenticate_resource_owner) { proc { redirect_to
|
|
45
|
+
allow(Doorkeeper.configuration).to receive(:authenticate_resource_owner) { proc { redirect_to "/" } }
|
|
44
46
|
end
|
|
45
47
|
end
|
|
46
48
|
|
|
47
|
-
shared_context
|
|
49
|
+
shared_context "valid authorization request" do
|
|
48
50
|
let :authorization do
|
|
49
|
-
double(:authorization, valid?: true, authorize: true, success_redirect_uri:
|
|
51
|
+
double(:authorization, valid?: true, authorize: true, success_redirect_uri: "http://something.com/cb?code=token")
|
|
50
52
|
end
|
|
51
53
|
|
|
52
54
|
before do
|
|
@@ -54,7 +56,7 @@ shared_context 'valid authorization request' do
|
|
|
54
56
|
end
|
|
55
57
|
end
|
|
56
58
|
|
|
57
|
-
shared_context
|
|
59
|
+
shared_context "invalid authorization request" do
|
|
58
60
|
let :authorization do
|
|
59
61
|
double(:authorization, valid?: false, authorize: false, redirect_on_error?: false)
|
|
60
62
|
end
|
|
@@ -64,9 +66,9 @@ shared_context 'invalid authorization request' do
|
|
|
64
66
|
end
|
|
65
67
|
end
|
|
66
68
|
|
|
67
|
-
shared_context
|
|
69
|
+
shared_context "expired token", token: :expired do
|
|
68
70
|
let :token_string do
|
|
69
|
-
|
|
71
|
+
"1A2B3C4DEXP"
|
|
70
72
|
end
|
|
71
73
|
|
|
72
74
|
let :token do
|
|
@@ -83,9 +85,9 @@ shared_context 'expired token', token: :expired do
|
|
|
83
85
|
end
|
|
84
86
|
end
|
|
85
87
|
|
|
86
|
-
shared_context
|
|
88
|
+
shared_context "revoked token", token: :revoked do
|
|
87
89
|
let :token_string do
|
|
88
|
-
|
|
90
|
+
"1A2B3C4DREV"
|
|
89
91
|
end
|
|
90
92
|
|
|
91
93
|
let :token do
|
|
@@ -102,9 +104,9 @@ shared_context 'revoked token', token: :revoked do
|
|
|
102
104
|
end
|
|
103
105
|
end
|
|
104
106
|
|
|
105
|
-
shared_context
|
|
107
|
+
shared_context "forbidden token", token: :forbidden do
|
|
106
108
|
let :token_string do
|
|
107
|
-
|
|
109
|
+
"1A2B3C4DFORB"
|
|
108
110
|
end
|
|
109
111
|
|
|
110
112
|
let :token do
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
shared_context "with token hashing enabled" do
|
|
4
|
+
let(:hashed_or_plain_token_func) do
|
|
5
|
+
Doorkeeper::SecretStoring::Sha256Hash.method(:transform_secret)
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
before do
|
|
9
|
+
Doorkeeper.configure do
|
|
10
|
+
hash_token_secrets
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
shared_context "with token hashing and fallback lookup enabled" do
|
|
16
|
+
let(:hashed_or_plain_token_func) do
|
|
17
|
+
Doorkeeper::SecretStoring::Sha256Hash.method(:transform_secret)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
before do
|
|
21
|
+
Doorkeeper.configure do
|
|
22
|
+
hash_token_secrets fallback: :plain
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
shared_context "with application hashing enabled" do
|
|
28
|
+
let(:hashed_or_plain_token_func) do
|
|
29
|
+
Doorkeeper::SecretStoring::Sha256Hash.method(:transform_secret)
|
|
30
|
+
end
|
|
31
|
+
before do
|
|
32
|
+
Doorkeeper.configure do
|
|
33
|
+
hash_application_secrets
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -1,46 +1,48 @@
|
|
|
1
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
shared_examples "an accessible token" do
|
|
2
4
|
describe :accessible? do
|
|
3
|
-
it
|
|
5
|
+
it "is accessible if token is not expired" do
|
|
4
6
|
allow(subject).to receive(:expired?).and_return(false)
|
|
5
7
|
should be_accessible
|
|
6
8
|
end
|
|
7
9
|
|
|
8
|
-
it
|
|
10
|
+
it "is not accessible if token is expired" do
|
|
9
11
|
allow(subject).to receive(:expired?).and_return(true)
|
|
10
12
|
should_not be_accessible
|
|
11
13
|
end
|
|
12
14
|
end
|
|
13
15
|
end
|
|
14
16
|
|
|
15
|
-
shared_examples
|
|
17
|
+
shared_examples "a revocable token" do
|
|
16
18
|
describe :accessible? do
|
|
17
19
|
before { subject.save! }
|
|
18
20
|
|
|
19
|
-
it
|
|
21
|
+
it "is accessible if token is not revoked" do
|
|
20
22
|
expect(subject).to be_accessible
|
|
21
23
|
end
|
|
22
24
|
|
|
23
|
-
it
|
|
25
|
+
it "is not accessible if token is revoked" do
|
|
24
26
|
subject.revoke
|
|
25
27
|
expect(subject).not_to be_accessible
|
|
26
28
|
end
|
|
27
29
|
end
|
|
28
30
|
end
|
|
29
31
|
|
|
30
|
-
shared_examples
|
|
32
|
+
shared_examples "a unique token" do
|
|
31
33
|
describe :token do
|
|
32
|
-
it
|
|
34
|
+
it "is generated before validation" do
|
|
33
35
|
expect { subject.valid? }.to change { subject.token }.from(nil)
|
|
34
36
|
end
|
|
35
37
|
|
|
36
|
-
it
|
|
38
|
+
it "is not valid if token exists" do
|
|
37
39
|
token1 = FactoryBot.create factory_name
|
|
38
40
|
token2 = FactoryBot.create factory_name
|
|
39
41
|
token2.token = token1.token
|
|
40
42
|
expect(token2).not_to be_valid
|
|
41
43
|
end
|
|
42
44
|
|
|
43
|
-
it
|
|
45
|
+
it "expects database to throw an error when tokens are the same" do
|
|
44
46
|
token1 = FactoryBot.create factory_name
|
|
45
47
|
token2 = FactoryBot.create factory_name
|
|
46
48
|
token2.token = token1.token
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "spec_helper"
|
|
2
4
|
|
|
3
5
|
describe RedirectUriValidator do
|
|
4
6
|
subject do
|
|
5
7
|
FactoryBot.create(:application)
|
|
6
8
|
end
|
|
7
9
|
|
|
8
|
-
it
|
|
9
|
-
subject.redirect_uri =
|
|
10
|
+
it "is valid when the uri is a uri" do
|
|
11
|
+
subject.redirect_uri = "https://example.com/callback"
|
|
10
12
|
expect(subject).to be_valid
|
|
11
13
|
end
|
|
12
14
|
|
|
@@ -15,115 +17,142 @@ describe RedirectUriValidator do
|
|
|
15
17
|
# the system browser.
|
|
16
18
|
#
|
|
17
19
|
# @see https://www.oauth.com/oauth2-servers/redirect-uris/redirect-uris-native-apps/
|
|
18
|
-
it
|
|
19
|
-
subject.redirect_uri =
|
|
20
|
+
it "is valid when the uri is custom native URI" do
|
|
21
|
+
subject.redirect_uri = "myapp://callback"
|
|
20
22
|
expect(subject).to be_valid
|
|
21
23
|
end
|
|
22
24
|
|
|
23
|
-
it
|
|
24
|
-
subject.redirect_uri =
|
|
25
|
+
it "is valid when the uri has a query parameter" do
|
|
26
|
+
subject.redirect_uri = "https://example.com/abcd?xyz=123"
|
|
25
27
|
expect(subject).to be_valid
|
|
26
28
|
end
|
|
27
29
|
|
|
28
|
-
it
|
|
29
|
-
subject.redirect_uri =
|
|
30
|
+
it "accepts native redirect uri" do
|
|
31
|
+
subject.redirect_uri = "urn:ietf:wg:oauth:2.0:oob"
|
|
30
32
|
expect(subject).to be_valid
|
|
31
33
|
end
|
|
32
34
|
|
|
33
|
-
it
|
|
35
|
+
it "rejects if test uri is disabled" do
|
|
34
36
|
allow(RedirectUriValidator).to receive(:native_redirect_uri).and_return(nil)
|
|
35
|
-
subject.redirect_uri =
|
|
37
|
+
subject.redirect_uri = "urn:some:test"
|
|
36
38
|
expect(subject).not_to be_valid
|
|
37
39
|
end
|
|
38
40
|
|
|
39
|
-
it
|
|
40
|
-
subject.redirect_uri =
|
|
41
|
+
it "is invalid when the uri is not a uri" do
|
|
42
|
+
subject.redirect_uri = "]"
|
|
41
43
|
expect(subject).not_to be_valid
|
|
42
|
-
expect(subject.errors[:redirect_uri].first).to eq(
|
|
44
|
+
expect(subject.errors[:redirect_uri].first).to eq("must be a valid URI.")
|
|
43
45
|
end
|
|
44
46
|
|
|
45
|
-
it
|
|
46
|
-
subject.redirect_uri =
|
|
47
|
+
it "is invalid when the uri is relative" do
|
|
48
|
+
subject.redirect_uri = "/abcd"
|
|
47
49
|
expect(subject).not_to be_valid
|
|
48
|
-
expect(subject.errors[:redirect_uri].first).to eq(
|
|
50
|
+
expect(subject.errors[:redirect_uri].first).to eq("must be an absolute URI.")
|
|
49
51
|
end
|
|
50
52
|
|
|
51
|
-
it
|
|
52
|
-
subject.redirect_uri =
|
|
53
|
+
it "is invalid when the uri has a fragment" do
|
|
54
|
+
subject.redirect_uri = "https://example.com/abcd#xyz"
|
|
53
55
|
expect(subject).not_to be_valid
|
|
54
|
-
expect(subject.errors[:redirect_uri].first).to eq(
|
|
56
|
+
expect(subject.errors[:redirect_uri].first).to eq("cannot contain a fragment.")
|
|
55
57
|
end
|
|
56
58
|
|
|
57
|
-
context
|
|
58
|
-
it
|
|
59
|
-
subject.redirect_uri =
|
|
59
|
+
context "force secured uri" do
|
|
60
|
+
it "accepts an valid uri" do
|
|
61
|
+
subject.redirect_uri = "https://example.com/callback"
|
|
60
62
|
expect(subject).to be_valid
|
|
61
63
|
end
|
|
62
64
|
|
|
63
|
-
it
|
|
64
|
-
subject.redirect_uri =
|
|
65
|
+
it "accepts native redirect uri" do
|
|
66
|
+
subject.redirect_uri = "urn:ietf:wg:oauth:2.0:oob"
|
|
65
67
|
expect(subject).to be_valid
|
|
66
68
|
end
|
|
67
69
|
|
|
68
|
-
it
|
|
69
|
-
subject.redirect_uri =
|
|
70
|
+
it "accepts app redirect uri" do
|
|
71
|
+
subject.redirect_uri = "some-awesome-app://oauth/callback"
|
|
70
72
|
expect(subject).to be_valid
|
|
71
73
|
end
|
|
72
74
|
|
|
73
|
-
it
|
|
74
|
-
subject.redirect_uri =
|
|
75
|
+
it "accepts a non secured protocol when disabled" do
|
|
76
|
+
subject.redirect_uri = "http://example.com/callback"
|
|
75
77
|
allow(Doorkeeper.configuration).to receive(
|
|
76
78
|
:force_ssl_in_redirect_uri
|
|
77
79
|
).and_return(false)
|
|
78
80
|
expect(subject).to be_valid
|
|
79
81
|
end
|
|
80
82
|
|
|
81
|
-
it
|
|
83
|
+
it "accepts a non secured protocol when conditional option defined" do
|
|
82
84
|
Doorkeeper.configure do
|
|
83
85
|
orm DOORKEEPER_ORM
|
|
84
|
-
force_ssl_in_redirect_uri { |uri| uri.host !=
|
|
86
|
+
force_ssl_in_redirect_uri { |uri| uri.host != "localhost" }
|
|
85
87
|
end
|
|
86
88
|
|
|
87
|
-
application = FactoryBot.build(:application, redirect_uri:
|
|
89
|
+
application = FactoryBot.build(:application, redirect_uri: "http://localhost/callback")
|
|
88
90
|
expect(application).to be_valid
|
|
89
91
|
|
|
90
|
-
application = FactoryBot.build(:application, redirect_uri:
|
|
92
|
+
application = FactoryBot.build(:application, redirect_uri: "https://test.com/callback")
|
|
91
93
|
expect(application).to be_valid
|
|
92
94
|
|
|
93
|
-
application = FactoryBot.build(:application, redirect_uri:
|
|
95
|
+
application = FactoryBot.build(:application, redirect_uri: "http://localhost2/callback")
|
|
94
96
|
expect(application).not_to be_valid
|
|
95
97
|
|
|
96
|
-
application = FactoryBot.build(:application, redirect_uri:
|
|
98
|
+
application = FactoryBot.build(:application, redirect_uri: "https://test.com/callback")
|
|
97
99
|
expect(application).to be_valid
|
|
98
100
|
end
|
|
99
101
|
|
|
100
|
-
it
|
|
101
|
-
subject.redirect_uri =
|
|
102
|
+
it "forbids redirect uri if required" do
|
|
103
|
+
subject.redirect_uri = "javascript://document.cookie"
|
|
102
104
|
|
|
103
105
|
Doorkeeper.configure do
|
|
104
106
|
orm DOORKEEPER_ORM
|
|
105
|
-
forbid_redirect_uri { |uri| uri.scheme ==
|
|
107
|
+
forbid_redirect_uri { |uri| uri.scheme == "javascript" }
|
|
106
108
|
end
|
|
107
109
|
|
|
108
110
|
expect(subject).to be_invalid
|
|
109
|
-
expect(subject.errors[:redirect_uri].first).to eq(
|
|
111
|
+
expect(subject.errors[:redirect_uri].first).to eq("is forbidden by the server.")
|
|
110
112
|
|
|
111
|
-
subject.redirect_uri =
|
|
113
|
+
subject.redirect_uri = "https://localhost/callback"
|
|
112
114
|
expect(subject).to be_valid
|
|
113
115
|
end
|
|
114
116
|
|
|
115
|
-
it
|
|
116
|
-
subject.redirect_uri =
|
|
117
|
+
it "invalidates the uri when the uri does not use a secure protocol" do
|
|
118
|
+
subject.redirect_uri = "http://example.com/callback"
|
|
117
119
|
expect(subject).not_to be_valid
|
|
118
120
|
error = subject.errors[:redirect_uri].first
|
|
119
|
-
expect(error).to eq(
|
|
121
|
+
expect(error).to eq("must be an HTTPS/SSL URI.")
|
|
120
122
|
end
|
|
121
123
|
end
|
|
122
124
|
|
|
123
|
-
context
|
|
124
|
-
it
|
|
125
|
+
context "multiple redirect uri" do
|
|
126
|
+
it "invalidates the second uri when the first uri is native uri" do
|
|
125
127
|
subject.redirect_uri = "urn:ietf:wg:oauth:2.0:oob\nexample.com/callback"
|
|
126
128
|
expect(subject).to be_invalid
|
|
127
129
|
end
|
|
128
130
|
end
|
|
131
|
+
|
|
132
|
+
context "blank redirect URI" do
|
|
133
|
+
it "forbids blank redirect uri by default" do
|
|
134
|
+
subject.redirect_uri = ""
|
|
135
|
+
|
|
136
|
+
expect(subject).to be_invalid
|
|
137
|
+
expect(subject.errors[:redirect_uri]).not_to be_blank
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
it "forbids blank redirect uri by custom condition" do
|
|
141
|
+
Doorkeeper.configure do
|
|
142
|
+
orm DOORKEEPER_ORM
|
|
143
|
+
allow_blank_redirect_uri do |_grant_flows, application|
|
|
144
|
+
application.name == "admin app"
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
subject.name = "test app"
|
|
149
|
+
subject.redirect_uri = ""
|
|
150
|
+
|
|
151
|
+
expect(subject).to be_invalid
|
|
152
|
+
expect(subject.errors[:redirect_uri]).not_to be_blank
|
|
153
|
+
|
|
154
|
+
subject.name = "admin app"
|
|
155
|
+
expect(subject).to be_valid
|
|
156
|
+
end
|
|
157
|
+
end
|
|
129
158
|
end
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "spec_helper"
|
|
2
4
|
|
|
3
5
|
describe Doorkeeper::VERSION do
|
|
4
|
-
context
|
|
5
|
-
it
|
|
6
|
+
context "#gem_version" do
|
|
7
|
+
it "returns Gem::Version instance" do
|
|
6
8
|
expect(Doorkeeper.gem_version).to be_an_instance_of(Gem::Version)
|
|
7
9
|
end
|
|
8
10
|
end
|
|
9
11
|
|
|
10
|
-
context
|
|
11
|
-
it
|
|
12
|
+
context "VERSION" do
|
|
13
|
+
it "returns gem version string" do
|
|
12
14
|
expect(Doorkeeper::VERSION::STRING).to match(/^\d+\.\d+\.\d+(\.\w+)?$/)
|
|
13
15
|
end
|
|
14
16
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: doorkeeper
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.0
|
|
4
|
+
version: 5.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Felipe Elias Philipp
|
|
@@ -11,7 +11,7 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date:
|
|
14
|
+
date: 2019-04-17 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: railties
|
|
@@ -19,30 +19,30 @@ dependencies:
|
|
|
19
19
|
requirements:
|
|
20
20
|
- - ">="
|
|
21
21
|
- !ruby/object:Gem::Version
|
|
22
|
-
version: '
|
|
22
|
+
version: '5'
|
|
23
23
|
type: :runtime
|
|
24
24
|
prerelease: false
|
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
26
|
requirements:
|
|
27
27
|
- - ">="
|
|
28
28
|
- !ruby/object:Gem::Version
|
|
29
|
-
version: '
|
|
29
|
+
version: '5'
|
|
30
30
|
- !ruby/object:Gem::Dependency
|
|
31
|
-
name:
|
|
31
|
+
name: appraisal
|
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
|
33
33
|
requirements:
|
|
34
|
-
- - "
|
|
34
|
+
- - ">="
|
|
35
35
|
- !ruby/object:Gem::Version
|
|
36
|
-
version: '
|
|
36
|
+
version: '0'
|
|
37
37
|
type: :development
|
|
38
38
|
prerelease: false
|
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
|
40
40
|
requirements:
|
|
41
|
-
- - "
|
|
41
|
+
- - ">="
|
|
42
42
|
- !ruby/object:Gem::Version
|
|
43
|
-
version: '
|
|
43
|
+
version: '0'
|
|
44
44
|
- !ruby/object:Gem::Dependency
|
|
45
|
-
name:
|
|
45
|
+
name: capybara
|
|
46
46
|
requirement: !ruby/object:Gem::Requirement
|
|
47
47
|
requirements:
|
|
48
48
|
- - ">="
|
|
@@ -56,33 +56,33 @@ dependencies:
|
|
|
56
56
|
- !ruby/object:Gem::Version
|
|
57
57
|
version: '0'
|
|
58
58
|
- !ruby/object:Gem::Dependency
|
|
59
|
-
name:
|
|
59
|
+
name: coveralls
|
|
60
60
|
requirement: !ruby/object:Gem::Requirement
|
|
61
61
|
requirements:
|
|
62
|
-
- - "
|
|
62
|
+
- - ">="
|
|
63
63
|
- !ruby/object:Gem::Version
|
|
64
|
-
version: '
|
|
64
|
+
version: '0'
|
|
65
65
|
type: :development
|
|
66
66
|
prerelease: false
|
|
67
67
|
version_requirements: !ruby/object:Gem::Requirement
|
|
68
68
|
requirements:
|
|
69
|
-
- - "
|
|
69
|
+
- - ">="
|
|
70
70
|
- !ruby/object:Gem::Version
|
|
71
|
-
version: '
|
|
71
|
+
version: '0'
|
|
72
72
|
- !ruby/object:Gem::Dependency
|
|
73
|
-
name:
|
|
73
|
+
name: danger
|
|
74
74
|
requirement: !ruby/object:Gem::Requirement
|
|
75
75
|
requirements:
|
|
76
|
-
- - "
|
|
76
|
+
- - "~>"
|
|
77
77
|
- !ruby/object:Gem::Version
|
|
78
|
-
version: '0'
|
|
78
|
+
version: '6.0'
|
|
79
79
|
type: :development
|
|
80
80
|
prerelease: false
|
|
81
81
|
version_requirements: !ruby/object:Gem::Requirement
|
|
82
82
|
requirements:
|
|
83
|
-
- - "
|
|
83
|
+
- - "~>"
|
|
84
84
|
- !ruby/object:Gem::Version
|
|
85
|
-
version: '0'
|
|
85
|
+
version: '6.0'
|
|
86
86
|
- !ruby/object:Gem::Dependency
|
|
87
87
|
name: database_cleaner
|
|
88
88
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -103,14 +103,14 @@ dependencies:
|
|
|
103
103
|
requirements:
|
|
104
104
|
- - "~>"
|
|
105
105
|
- !ruby/object:Gem::Version
|
|
106
|
-
version: '
|
|
106
|
+
version: '5.0'
|
|
107
107
|
type: :development
|
|
108
108
|
prerelease: false
|
|
109
109
|
version_requirements: !ruby/object:Gem::Requirement
|
|
110
110
|
requirements:
|
|
111
111
|
- - "~>"
|
|
112
112
|
- !ruby/object:Gem::Version
|
|
113
|
-
version: '
|
|
113
|
+
version: '5.0'
|
|
114
114
|
- !ruby/object:Gem::Dependency
|
|
115
115
|
name: generator_spec
|
|
116
116
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -125,6 +125,20 @@ dependencies:
|
|
|
125
125
|
- - "~>"
|
|
126
126
|
- !ruby/object:Gem::Version
|
|
127
127
|
version: 0.9.3
|
|
128
|
+
- !ruby/object:Gem::Dependency
|
|
129
|
+
name: grape
|
|
130
|
+
requirement: !ruby/object:Gem::Requirement
|
|
131
|
+
requirements:
|
|
132
|
+
- - ">="
|
|
133
|
+
- !ruby/object:Gem::Version
|
|
134
|
+
version: '0'
|
|
135
|
+
type: :development
|
|
136
|
+
prerelease: false
|
|
137
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
138
|
+
requirements:
|
|
139
|
+
- - ">="
|
|
140
|
+
- !ruby/object:Gem::Version
|
|
141
|
+
version: '0'
|
|
128
142
|
- !ruby/object:Gem::Dependency
|
|
129
143
|
name: rake
|
|
130
144
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -205,15 +219,17 @@ files:
|
|
|
205
219
|
- app/views/doorkeeper/authorized_applications/index.html.erb
|
|
206
220
|
- app/views/layouts/doorkeeper/admin.html.erb
|
|
207
221
|
- app/views/layouts/doorkeeper/application.html.erb
|
|
222
|
+
- bin/console
|
|
208
223
|
- config/locales/en.yml
|
|
209
224
|
- doorkeeper.gemspec
|
|
210
|
-
- gemfiles/rails_4_2.gemfile
|
|
211
225
|
- gemfiles/rails_5_0.gemfile
|
|
212
226
|
- gemfiles/rails_5_1.gemfile
|
|
213
227
|
- gemfiles/rails_5_2.gemfile
|
|
228
|
+
- gemfiles/rails_6_0.gemfile
|
|
214
229
|
- gemfiles/rails_master.gemfile
|
|
215
230
|
- lib/doorkeeper.rb
|
|
216
231
|
- lib/doorkeeper/config.rb
|
|
232
|
+
- lib/doorkeeper/config/option.rb
|
|
217
233
|
- lib/doorkeeper/engine.rb
|
|
218
234
|
- lib/doorkeeper/errors.rb
|
|
219
235
|
- lib/doorkeeper/grape/authorization_decorator.rb
|
|
@@ -226,8 +242,10 @@ files:
|
|
|
226
242
|
- lib/doorkeeper/models/concerns/expirable.rb
|
|
227
243
|
- lib/doorkeeper/models/concerns/orderable.rb
|
|
228
244
|
- lib/doorkeeper/models/concerns/ownership.rb
|
|
245
|
+
- lib/doorkeeper/models/concerns/reusable.rb
|
|
229
246
|
- lib/doorkeeper/models/concerns/revocable.rb
|
|
230
247
|
- lib/doorkeeper/models/concerns/scopes.rb
|
|
248
|
+
- lib/doorkeeper/models/concerns/secret_storable.rb
|
|
231
249
|
- lib/doorkeeper/oauth.rb
|
|
232
250
|
- lib/doorkeeper/oauth/authorization/code.rb
|
|
233
251
|
- lib/doorkeeper/oauth/authorization/context.rb
|
|
@@ -279,6 +297,10 @@ files:
|
|
|
279
297
|
- lib/doorkeeper/request/refresh_token.rb
|
|
280
298
|
- lib/doorkeeper/request/strategy.rb
|
|
281
299
|
- lib/doorkeeper/request/token.rb
|
|
300
|
+
- lib/doorkeeper/secret_storing/base.rb
|
|
301
|
+
- lib/doorkeeper/secret_storing/bcrypt.rb
|
|
302
|
+
- lib/doorkeeper/secret_storing/plain.rb
|
|
303
|
+
- lib/doorkeeper/secret_storing/sha256_hash.rb
|
|
282
304
|
- lib/doorkeeper/server.rb
|
|
283
305
|
- lib/doorkeeper/stale_records_cleaner.rb
|
|
284
306
|
- lib/doorkeeper/validations.rb
|
|
@@ -325,7 +347,6 @@ files:
|
|
|
325
347
|
- spec/dummy/config/environments/test.rb
|
|
326
348
|
- spec/dummy/config/initializers/backtrace_silencers.rb
|
|
327
349
|
- spec/dummy/config/initializers/doorkeeper.rb
|
|
328
|
-
- spec/dummy/config/initializers/new_framework_defaults.rb
|
|
329
350
|
- spec/dummy/config/initializers/secret_token.rb
|
|
330
351
|
- spec/dummy/config/initializers/session_store.rb
|
|
331
352
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
|
@@ -358,8 +379,10 @@ files:
|
|
|
358
379
|
- spec/lib/config_spec.rb
|
|
359
380
|
- spec/lib/doorkeeper_spec.rb
|
|
360
381
|
- spec/lib/models/expirable_spec.rb
|
|
382
|
+
- spec/lib/models/reusable_spec.rb
|
|
361
383
|
- spec/lib/models/revocable_spec.rb
|
|
362
384
|
- spec/lib/models/scopes_spec.rb
|
|
385
|
+
- spec/lib/models/secret_storable_spec.rb
|
|
363
386
|
- spec/lib/oauth/authorization/uri_builder_spec.rb
|
|
364
387
|
- spec/lib/oauth/authorization_code_request_spec.rb
|
|
365
388
|
- spec/lib/oauth/base_request_spec.rb
|
|
@@ -388,6 +411,10 @@ files:
|
|
|
388
411
|
- spec/lib/oauth/token_response_spec.rb
|
|
389
412
|
- spec/lib/oauth/token_spec.rb
|
|
390
413
|
- spec/lib/request/strategy_spec.rb
|
|
414
|
+
- spec/lib/secret_storing/base_spec.rb
|
|
415
|
+
- spec/lib/secret_storing/bcrypt_spec.rb
|
|
416
|
+
- spec/lib/secret_storing/plain_spec.rb
|
|
417
|
+
- spec/lib/secret_storing/sha256_hash_spec.rb
|
|
391
418
|
- spec/lib/server_spec.rb
|
|
392
419
|
- spec/lib/stale_records_cleaner_spec.rb
|
|
393
420
|
- spec/models/doorkeeper/access_grant_spec.rb
|
|
@@ -424,6 +451,7 @@ files:
|
|
|
424
451
|
- spec/support/http_method_shim.rb
|
|
425
452
|
- spec/support/orm/active_record.rb
|
|
426
453
|
- spec/support/shared/controllers_shared_context.rb
|
|
454
|
+
- spec/support/shared/hashing_shared_context.rb
|
|
427
455
|
- spec/support/shared/models_shared_examples.rb
|
|
428
456
|
- spec/validators/redirect_uri_validator_spec.rb
|
|
429
457
|
- spec/version/version_spec.rb
|
|
@@ -440,7 +468,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
440
468
|
requirements:
|
|
441
469
|
- - ">="
|
|
442
470
|
- !ruby/object:Gem::Version
|
|
443
|
-
version: '2.
|
|
471
|
+
version: '2.4'
|
|
444
472
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
445
473
|
requirements:
|
|
446
474
|
- - ">="
|
|
@@ -480,7 +508,6 @@ test_files:
|
|
|
480
508
|
- spec/dummy/config/environments/test.rb
|
|
481
509
|
- spec/dummy/config/initializers/backtrace_silencers.rb
|
|
482
510
|
- spec/dummy/config/initializers/doorkeeper.rb
|
|
483
|
-
- spec/dummy/config/initializers/new_framework_defaults.rb
|
|
484
511
|
- spec/dummy/config/initializers/secret_token.rb
|
|
485
512
|
- spec/dummy/config/initializers/session_store.rb
|
|
486
513
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
|
@@ -513,8 +540,10 @@ test_files:
|
|
|
513
540
|
- spec/lib/config_spec.rb
|
|
514
541
|
- spec/lib/doorkeeper_spec.rb
|
|
515
542
|
- spec/lib/models/expirable_spec.rb
|
|
543
|
+
- spec/lib/models/reusable_spec.rb
|
|
516
544
|
- spec/lib/models/revocable_spec.rb
|
|
517
545
|
- spec/lib/models/scopes_spec.rb
|
|
546
|
+
- spec/lib/models/secret_storable_spec.rb
|
|
518
547
|
- spec/lib/oauth/authorization/uri_builder_spec.rb
|
|
519
548
|
- spec/lib/oauth/authorization_code_request_spec.rb
|
|
520
549
|
- spec/lib/oauth/base_request_spec.rb
|
|
@@ -543,6 +572,10 @@ test_files:
|
|
|
543
572
|
- spec/lib/oauth/token_response_spec.rb
|
|
544
573
|
- spec/lib/oauth/token_spec.rb
|
|
545
574
|
- spec/lib/request/strategy_spec.rb
|
|
575
|
+
- spec/lib/secret_storing/base_spec.rb
|
|
576
|
+
- spec/lib/secret_storing/bcrypt_spec.rb
|
|
577
|
+
- spec/lib/secret_storing/plain_spec.rb
|
|
578
|
+
- spec/lib/secret_storing/sha256_hash_spec.rb
|
|
546
579
|
- spec/lib/server_spec.rb
|
|
547
580
|
- spec/lib/stale_records_cleaner_spec.rb
|
|
548
581
|
- spec/models/doorkeeper/access_grant_spec.rb
|
|
@@ -579,6 +612,7 @@ test_files:
|
|
|
579
612
|
- spec/support/http_method_shim.rb
|
|
580
613
|
- spec/support/orm/active_record.rb
|
|
581
614
|
- spec/support/shared/controllers_shared_context.rb
|
|
615
|
+
- spec/support/shared/hashing_shared_context.rb
|
|
582
616
|
- spec/support/shared/models_shared_examples.rb
|
|
583
617
|
- spec/validators/redirect_uri_validator_spec.rb
|
|
584
618
|
- spec/version/version_spec.rb
|