doorkeeper-sequel 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.editorconfig +6 -0
- data/README.md +9 -6
- data/doorkeeper-sequel.gemspec +1 -1
- data/gemfiles/rails-6.0.gemfile +1 -1
- data/lib/doorkeeper-sequel.rb +1 -0
- data/lib/doorkeeper-sequel/gem_version.rb +1 -1
- data/lib/doorkeeper-sequel/generators/polymorphic_resource_owner_generator.rb +16 -0
- data/lib/doorkeeper-sequel/generators/templates/create_doorkeeper_tables.rb +3 -1
- data/lib/doorkeeper-sequel/generators/templates/enable_polymorphic_resource_owner_migration.rb +15 -0
- data/lib/doorkeeper-sequel/mixins/access_token_mixin.rb +49 -13
- data/lib/doorkeeper-sequel/mixins/application_mixin.rb +18 -0
- data/lib/doorkeeper-sequel/tasks/doorkeeper-sequel.rake +5 -0
- data/lib/doorkeeper/orm/sequel.rb +1 -0
- data/lib/doorkeeper/orm/sequel/access_token.rb +4 -0
- data/spec/stubs/config/initializers/db.rb +3 -1
- data/spec/stubs/spec_helper_integration.rb +1 -3
- metadata +113 -110
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72ee1613a7a5a0a76e7637cdef01a3d550d24d47f88eb73320341bd578b0eb47
|
4
|
+
data.tar.gz: 3930d9e295c17fe8f6442954053c9766e42685434c6abf15217ccb2c50257a47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0f9b92e332699473574bbb2ef64bd5bce474f4cc18acb103327a96bdb230924f1f7ae9ded9a70da94ba1892edef88c701e25138acd6007f90363533e558cf64
|
7
|
+
data.tar.gz: 36a767f5a731de802f92629320991dd04a5e30cff322b12fc627e71d6e12a342222119ec34947b407ec644c27783e0abcfb212e70dab325b7251ef26693cdff4
|
data/.editorconfig
ADDED
data/README.md
CHANGED
@@ -16,14 +16,16 @@
|
|
16
16
|
|
17
17
|
To start using the Doorkeeper Sequel ORM, add to your Gemfile:
|
18
18
|
|
19
|
-
```
|
20
|
-
# For Doorkeeper 4.x
|
21
|
-
gem 'doorkeeper', '~> 4.3'
|
19
|
+
``` rubygem gem 'doorkeeper', '~> 4.3'
|
22
20
|
gem 'doorkeeper-sequel', '~> 1.5'
|
23
21
|
|
24
|
-
# For Doorkeeper 5.
|
25
|
-
gem 'doorkeeper', '~> 5.0'
|
22
|
+
# For Doorkeeper 5.1
|
23
|
+
gem 'doorkeeper', '~> 5.0' # or 5.1
|
26
24
|
gem 'doorkeeper-sequel', '~> 2.0'
|
25
|
+
|
26
|
+
# For Doorkeeper >= 5.2
|
27
|
+
gem 'doorkeeper', '~> 5.2'
|
28
|
+
gem 'doorkeeper-sequel', '~> 2.1'
|
27
29
|
```
|
28
30
|
|
29
31
|
Or you can use git `master` branch for the latest gem version:
|
@@ -48,6 +50,7 @@ rake doorkeeper_sequel:generate:application_owner
|
|
48
50
|
rake doorkeeper_sequel:generate:previous_refresh_token
|
49
51
|
rake doorkeeper_sequel:generate:confidential_applications # for Doorkeeper >= 4.4
|
50
52
|
rake doorkeeper_sequel:generate:pkce # for Doorkeeper >= 5.x
|
53
|
+
rake doorkeeper_sequel:generate:polymorphic_resource_owner # for Doorkeeper >= 5.3
|
51
54
|
```
|
52
55
|
|
53
56
|
## Tests
|
@@ -80,7 +83,7 @@ Thanks.
|
|
80
83
|
|
81
84
|
Doorkeeper-sequel gem is released under the [MIT License](http://www.opensource.org/licenses/MIT).
|
82
85
|
|
83
|
-
Copyright (c) 2016-
|
86
|
+
Copyright (c) 2016-2020 Nikita Bulai (bulajnikita@gmail.com).
|
84
87
|
|
85
88
|
---
|
86
89
|
|
data/doorkeeper-sequel.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |gem|
|
|
23
23
|
gem.required_ruby_version = ">= 2.0.0"
|
24
24
|
|
25
25
|
gem.add_runtime_dependency "bcrypt", "~> 3.1"
|
26
|
-
gem.add_runtime_dependency "doorkeeper", ">= 5.0.0", "< 5.
|
26
|
+
gem.add_runtime_dependency "doorkeeper", ">= 5.0.0", "< 5.4"
|
27
27
|
gem.add_runtime_dependency "sequel", ">= 4.0.0", "< 6"
|
28
28
|
gem.add_runtime_dependency "sequel_polymorphic", "~> 0.2", "< 1.0"
|
29
29
|
gem.add_runtime_dependency "thor", ">= 0.18", "< 6"
|
data/gemfiles/rails-6.0.gemfile
CHANGED
@@ -13,6 +13,6 @@ group :test do
|
|
13
13
|
gem "rspec-core", git: "https://github.com/rspec/rspec-core.git"
|
14
14
|
gem "rspec-expectations", git: "https://github.com/rspec/rspec-expectations.git"
|
15
15
|
gem "rspec-mocks", git: "https://github.com/rspec/rspec-mocks.git"
|
16
|
-
gem "rspec-rails",
|
16
|
+
gem "rspec-rails", "4.0.0.beta3"
|
17
17
|
gem "rspec-support", git: "https://github.com/rspec/rspec-support.git"
|
18
18
|
end
|
data/lib/doorkeeper-sequel.rb
CHANGED
@@ -14,6 +14,7 @@ require "doorkeeper-sequel/generators/application_owner_generator"
|
|
14
14
|
require "doorkeeper-sequel/generators/migration_generator"
|
15
15
|
require "doorkeeper-sequel/generators/previous_refresh_token_generator"
|
16
16
|
require "doorkeeper-sequel/generators/confidential_applications_generator"
|
17
|
+
require "doorkeeper-sequel/generators/polymorphic_resource_owner_generator"
|
17
18
|
|
18
19
|
require "doorkeeper-sequel/mixins/concerns/sequel_compat"
|
19
20
|
require "doorkeeper-sequel/mixins/access_token_mixin"
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module DoorkeeperSequel
|
4
|
+
class PolymorphicResourceOwnerGenerator < ::Thor::Group
|
5
|
+
include ::Thor::Actions
|
6
|
+
include MigrationActions
|
7
|
+
|
8
|
+
source_root File.expand_path("templates", __dir__)
|
9
|
+
|
10
|
+
desc "Provide support for Polymorphic Resource Owner."
|
11
|
+
|
12
|
+
def install
|
13
|
+
create_migration "enable_polymorphic_resource_owner_migration.rb.erb"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -21,7 +21,8 @@ Sequel.migration do
|
|
21
21
|
primary_key :id
|
22
22
|
foreign_key :application_id, :oauth_applications, null: false, on_delete: :cascade
|
23
23
|
|
24
|
-
column :resource_owner_id, Integer, null: false
|
24
|
+
column :resource_owner_id, Integer, null: false, index: true
|
25
|
+
column :resource_owner_type, String, null: false, index: true
|
25
26
|
|
26
27
|
column :token, String, size: 255, null: false, index: { unique: true }
|
27
28
|
column :expires_in, Integer, null: false
|
@@ -36,6 +37,7 @@ Sequel.migration do
|
|
36
37
|
foreign_key :application_id, :oauth_applications, null: false, on_delete: :cascade
|
37
38
|
|
38
39
|
column :resource_owner_id, Integer, index: true
|
40
|
+
column :resource_owner_type, String, index: true
|
39
41
|
|
40
42
|
# If you use a custom token generator you may need to change this column
|
41
43
|
# from string to text, so that it accepts tokens larger than 255
|
data/lib/doorkeeper-sequel/generators/templates/enable_polymorphic_resource_owner_migration.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
Sequel.migration do
|
4
|
+
change do
|
5
|
+
alter_table(:oauth_access_grants) do
|
6
|
+
add_column :resource_owner_type, String, default: nil
|
7
|
+
add_index [:resource_owner_id, :resource_owner_type]
|
8
|
+
end
|
9
|
+
|
10
|
+
alter_table(:oauth_access_tokens) do
|
11
|
+
add_column :resource_owner_type, String, default: nil
|
12
|
+
add_index [:resource_owner_id, :resource_owner_type]
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -12,18 +12,21 @@ module DoorkeeperSequel
|
|
12
12
|
include Doorkeeper::Models::Accessible
|
13
13
|
include Doorkeeper::Models::SecretStorable
|
14
14
|
include Doorkeeper::Models::Scopes
|
15
|
+
include Doorkeeper::Models::ResourceOwnerable
|
15
16
|
|
16
17
|
included do
|
17
18
|
plugin :validation_helpers
|
18
19
|
plugin :timestamps
|
19
20
|
|
21
|
+
|
20
22
|
many_to_one :application, class: "Doorkeeper::Application"
|
23
|
+
many_to_one :resource_owner, polymorphic: true
|
21
24
|
|
22
25
|
attr_writer :use_refresh_token
|
23
26
|
|
24
|
-
set_allowed_columns :application_id, :resource_owner_id, :
|
25
|
-
|
26
|
-
|
27
|
+
set_allowed_columns :application_id, :resource_owner_id, :resource_owner_type,
|
28
|
+
:expires_in, :scopes, :use_refresh_token,
|
29
|
+
:previous_refresh_token, :token, :refresh_token
|
27
30
|
|
28
31
|
def before_validation
|
29
32
|
if new?
|
@@ -66,6 +69,10 @@ module DoorkeeperSequel
|
|
66
69
|
revoked_at: nil)
|
67
70
|
.update(revoked_at: clock.now.utc)
|
68
71
|
end
|
72
|
+
|
73
|
+
def by_previous_refresh_token(previous_refresh_token)
|
74
|
+
where(refresh_token: previous_refresh_token).first
|
75
|
+
end
|
69
76
|
|
70
77
|
def matching_token_for(application, resource_owner_or_id, scopes)
|
71
78
|
resource_owner_id = if resource_owner_or_id.respond_to?(:to_key)
|
@@ -103,25 +110,32 @@ module DoorkeeperSequel
|
|
103
110
|
)
|
104
111
|
end
|
105
112
|
|
106
|
-
def authorized_tokens_for(application_id,
|
107
|
-
where(application_id: application_id,
|
108
|
-
resource_owner_id: resource_owner_id,
|
113
|
+
def authorized_tokens_for(application_id, resource_owner)
|
114
|
+
by_resource_owner(resource_owner).where(application_id: application_id,
|
109
115
|
revoked_at: nil).order(Sequel.desc(:created_at))
|
110
116
|
end
|
111
117
|
|
112
|
-
def find_or_create_for(application,
|
118
|
+
def find_or_create_for(application, resource_owner, scopes, expires_in, use_refresh_token)
|
113
119
|
if Doorkeeper.configuration.reuse_access_token
|
114
|
-
access_token = matching_token_for(application,
|
120
|
+
access_token = matching_token_for(application, resource_owner, scopes)
|
115
121
|
return access_token if access_token&.reusable?
|
116
122
|
end
|
117
|
-
|
118
|
-
|
123
|
+
|
124
|
+
|
125
|
+
attributes = {
|
119
126
|
application_id: application.try(:id),
|
120
|
-
resource_owner_id: resource_owner_id,
|
121
127
|
scopes: scopes.to_s,
|
122
128
|
expires_in: expires_in,
|
123
129
|
use_refresh_token: use_refresh_token
|
124
|
-
|
130
|
+
}
|
131
|
+
|
132
|
+
if Doorkeeper.config.polymorphic_resource_owner?
|
133
|
+
attributes[:resource_owner] = resource_owner
|
134
|
+
else
|
135
|
+
attributes[:resource_owner_id] = resource_owner_id_for(resource_owner)
|
136
|
+
end
|
137
|
+
|
138
|
+
create!(attributes)
|
125
139
|
end
|
126
140
|
|
127
141
|
def last_authorized_token_for(application_id, resource_owner_id)
|
@@ -135,6 +149,10 @@ module DoorkeeperSequel
|
|
135
149
|
def fallback_secret_strategy
|
136
150
|
::Doorkeeper.configuration.token_secret_fallback_strategy
|
137
151
|
end
|
152
|
+
|
153
|
+
def polymorphic_resource_owner?
|
154
|
+
columns.include?(:resource_owner_type)
|
155
|
+
end
|
138
156
|
end
|
139
157
|
|
140
158
|
def token_type
|
@@ -153,7 +171,11 @@ module DoorkeeperSequel
|
|
153
171
|
expires_in: expires_in_seconds,
|
154
172
|
application: { uid: application.try(:uid) },
|
155
173
|
created_at: created_at.to_i,
|
156
|
-
}
|
174
|
+
}.tap do |json|
|
175
|
+
if Doorkeeper.configuration.polymorphic_resource_owner?
|
176
|
+
json[:resource_owner_type] = resource_owner_type
|
177
|
+
end
|
178
|
+
end
|
157
179
|
end
|
158
180
|
|
159
181
|
# It indicates whether the tokens have the same credential
|
@@ -181,9 +203,23 @@ module DoorkeeperSequel
|
|
181
203
|
@raw_token
|
182
204
|
end
|
183
205
|
end
|
206
|
+
|
207
|
+
# Revokes token with `:refresh_token` equal to `:previous_refresh_token`
|
208
|
+
# and clears `:previous_refresh_token` attribute.
|
209
|
+
#
|
210
|
+
def revoke_previous_refresh_token!
|
211
|
+
return unless self.class.refresh_token_revoked_on_use?
|
212
|
+
|
213
|
+
old_refresh_token&.revoke
|
214
|
+
update(previous_refresh_token: "")
|
215
|
+
end
|
184
216
|
|
185
217
|
private
|
186
218
|
|
219
|
+
def old_refresh_token
|
220
|
+
@old_refresh_token ||= self.class.by_previous_refresh_token(previous_refresh_token)
|
221
|
+
end
|
222
|
+
|
187
223
|
def generate_refresh_token
|
188
224
|
@raw_refresh_token = UniqueToken.generate
|
189
225
|
secret_strategy.store_secret(self, :refresh_token, @raw_refresh_token)
|
@@ -53,7 +53,25 @@ module DoorkeeperSequel
|
|
53
53
|
def confidential?
|
54
54
|
confidential.present? && !!confidential
|
55
55
|
end
|
56
|
+
|
57
|
+
def renew_secret
|
58
|
+
@raw_secret = Doorkeeper::OAuth::Helpers::UniqueToken.generate
|
59
|
+
secret_strategy.store_secret(self, :secret, @raw_secret)
|
60
|
+
end
|
56
61
|
|
62
|
+
|
63
|
+
def plaintext_secret
|
64
|
+
if secret_strategy.allows_restoring_secrets?
|
65
|
+
secret_strategy.restore_secret(self, :secret)
|
66
|
+
else
|
67
|
+
@raw_secret
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
def authorized_for_resource_owner?(resource_owner)
|
72
|
+
Doorkeeper.configuration.authorize_resource_owner_for_client.call(self, resource_owner)
|
73
|
+
end
|
74
|
+
|
57
75
|
protected
|
58
76
|
|
59
77
|
def validate_scopes_match_configured
|
@@ -26,5 +26,10 @@ namespace :doorkeeper_sequel do
|
|
26
26
|
task :confidential_applications do
|
27
27
|
DoorkeeperSequel::ConfidentialApplicationsGenerator.start
|
28
28
|
end
|
29
|
+
|
30
|
+
desc "Add resource owner type to Access tokens and grants"
|
31
|
+
task :polymorphic_resource_owner do
|
32
|
+
DoorkeeperSequel::PolymorphicResourceOwnerGenerator.start
|
33
|
+
end
|
29
34
|
end
|
30
35
|
end
|
@@ -28,7 +28,8 @@ DB.create_table :oauth_access_grants do
|
|
28
28
|
primary_key :id
|
29
29
|
column :application_id, Integer
|
30
30
|
|
31
|
-
column :resource_owner_id, Integer, null: false
|
31
|
+
column :resource_owner_id, Integer, null: false, index: true
|
32
|
+
column :resource_owner_type, String, index: true
|
32
33
|
|
33
34
|
column :token, String, size: 255, null: false, index: { unique: true }
|
34
35
|
column :expires_in, Integer, null: false
|
@@ -46,6 +47,7 @@ DB.create_table :oauth_access_tokens do
|
|
46
47
|
column :application_id, Integer
|
47
48
|
|
48
49
|
column :resource_owner_id, Integer, index: true
|
50
|
+
column :resource_owner_type, String, index: true
|
49
51
|
|
50
52
|
# If you use a custom token generator you may need to change this column
|
51
53
|
# from string to text, so that it accepts tokens larger than 255
|
@@ -25,9 +25,7 @@ require "support/orm/#{DOORKEEPER_ORM}"
|
|
25
25
|
ENGINE_RAILS_ROOT = File.join(File.dirname(__FILE__), "../")
|
26
26
|
|
27
27
|
Dir["#{File.dirname(__FILE__)}/support/{dependencies,helpers,shared}/*.rb"].each { |f| require f }
|
28
|
-
|
29
|
-
# Remove after dropping support of Rails 4.2
|
30
|
-
require "#{File.dirname(__FILE__)}/support/http_method_shim.rb"
|
28
|
+
Dir["#{ENGINE_RAILS_ROOT}/doorkeeper/lib/doorkeeper/config/*.rb"].each { |f| require f }
|
31
29
|
|
32
30
|
RSpec.configure do |config|
|
33
31
|
config.infer_spec_type_from_file_location!
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: doorkeeper-sequel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nikita Bulai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bcrypt
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
version: 5.0.0
|
34
34
|
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: '5.
|
36
|
+
version: '5.4'
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: 5.0.0
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '5.
|
46
|
+
version: '5.4'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: sequel
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -221,6 +221,7 @@ executables: []
|
|
221
221
|
extensions: []
|
222
222
|
extra_rdoc_files: []
|
223
223
|
files:
|
224
|
+
- ".editorconfig"
|
224
225
|
- ".gitignore"
|
225
226
|
- ".gitmodules"
|
226
227
|
- ".rspec"
|
@@ -244,12 +245,14 @@ files:
|
|
244
245
|
- lib/doorkeeper-sequel/generators/confidential_applications_generator.rb
|
245
246
|
- lib/doorkeeper-sequel/generators/migration_generator.rb
|
246
247
|
- lib/doorkeeper-sequel/generators/pkce_generator.rb
|
248
|
+
- lib/doorkeeper-sequel/generators/polymorphic_resource_owner_generator.rb
|
247
249
|
- lib/doorkeeper-sequel/generators/previous_refresh_token_generator.rb
|
248
250
|
- lib/doorkeeper-sequel/generators/templates/add_confidential_to_application_migration.rb
|
249
251
|
- lib/doorkeeper-sequel/generators/templates/add_owner_to_application.rb
|
250
252
|
- lib/doorkeeper-sequel/generators/templates/add_previous_refresh_token_to_access_tokens.rb
|
251
253
|
- lib/doorkeeper-sequel/generators/templates/create_doorkeeper_tables.rb
|
252
254
|
- lib/doorkeeper-sequel/generators/templates/enable_pkce_migration.rb
|
255
|
+
- lib/doorkeeper-sequel/generators/templates/enable_polymorphic_resource_owner_migration.rb
|
253
256
|
- lib/doorkeeper-sequel/mixins/access_grant_mixin.rb
|
254
257
|
- lib/doorkeeper-sequel/mixins/access_token_mixin.rb
|
255
258
|
- lib/doorkeeper-sequel/mixins/application_mixin.rb
|
@@ -428,141 +431,141 @@ signing_key:
|
|
428
431
|
specification_version: 4
|
429
432
|
summary: Doorkeeper Sequel ORM
|
430
433
|
test_files:
|
431
|
-
- spec/
|
432
|
-
- spec/
|
433
|
-
- spec/
|
434
|
+
- spec/routing/default_routes_spec.rb
|
435
|
+
- spec/routing/custom_controller_routes_spec.rb
|
436
|
+
- spec/routing/scoped_routes_spec.rb
|
437
|
+
- spec/lib/server_spec.rb
|
438
|
+
- spec/lib/oauth/code_response_spec.rb
|
434
439
|
- spec/lib/oauth/token_spec.rb
|
440
|
+
- spec/lib/oauth/code_request_spec.rb
|
435
441
|
- spec/lib/oauth/refresh_token_request_spec.rb
|
436
442
|
- spec/lib/oauth/pre_authorization_spec.rb
|
437
|
-
- spec/lib/oauth/token_response_spec.rb
|
438
|
-
- spec/lib/oauth/client/credentials_spec.rb
|
439
|
-
- spec/lib/oauth/token_request_spec.rb
|
440
|
-
- spec/lib/oauth/scopes_spec.rb
|
441
|
-
- spec/lib/oauth/client_credentials_request_spec.rb
|
442
|
-
- spec/lib/oauth/code_request_spec.rb
|
443
|
-
- spec/lib/oauth/client_spec.rb
|
444
|
-
- spec/lib/oauth/error_spec.rb
|
445
|
-
- spec/lib/oauth/forbidden_token_response_spec.rb
|
446
|
-
- spec/lib/oauth/client_credentials/issuer_spec.rb
|
447
|
-
- spec/lib/oauth/client_credentials/creator_spec.rb
|
448
|
-
- spec/lib/oauth/client_credentials/validation_spec.rb
|
449
|
-
- spec/lib/oauth/password_access_token_request_spec.rb
|
450
|
-
- spec/lib/oauth/code_response_spec.rb
|
451
|
-
- spec/lib/oauth/client_credentials_integration_spec.rb
|
452
443
|
- spec/lib/oauth/base_response_spec.rb
|
444
|
+
- spec/lib/oauth/base_request_spec.rb
|
445
|
+
- spec/lib/oauth/authorization_code_request_spec.rb
|
446
|
+
- spec/lib/oauth/error_response_spec.rb
|
447
|
+
- spec/lib/oauth/token_request_spec.rb
|
448
|
+
- spec/lib/oauth/helpers/unique_token_spec.rb
|
453
449
|
- spec/lib/oauth/helpers/uri_checker_spec.rb
|
454
450
|
- spec/lib/oauth/helpers/scope_checker_spec.rb
|
455
|
-
- spec/lib/oauth/
|
451
|
+
- spec/lib/oauth/invalid_request_response_spec.rb
|
456
452
|
- spec/lib/oauth/authorization/uri_builder_spec.rb
|
457
|
-
- spec/lib/oauth/
|
453
|
+
- spec/lib/oauth/client_credentials/validation_spec.rb
|
454
|
+
- spec/lib/oauth/client_credentials/issuer_spec.rb
|
455
|
+
- spec/lib/oauth/client_credentials/creator_spec.rb
|
456
|
+
- spec/lib/oauth/error_spec.rb
|
457
|
+
- spec/lib/oauth/scopes_spec.rb
|
458
|
+
- spec/lib/oauth/client_credentials_integration_spec.rb
|
459
|
+
- spec/lib/oauth/client_credentials_request_spec.rb
|
460
|
+
- spec/lib/oauth/password_access_token_request_spec.rb
|
458
461
|
- spec/lib/oauth/invalid_token_response_spec.rb
|
459
|
-
- spec/lib/oauth/
|
460
|
-
- spec/lib/oauth/
|
461
|
-
- spec/lib/oauth/
|
462
|
-
- spec/lib/
|
463
|
-
- spec/lib/models/scopes_spec.rb
|
464
|
-
- spec/lib/models/expirable_spec.rb
|
465
|
-
- spec/lib/models/revocable_spec.rb
|
466
|
-
- spec/lib/models/reusable_spec.rb
|
467
|
-
- spec/lib/models/secret_storable_spec.rb
|
468
|
-
- spec/lib/request/strategy_spec.rb
|
469
|
-
- spec/lib/secret_storing/plain_spec.rb
|
462
|
+
- spec/lib/oauth/forbidden_token_response_spec.rb
|
463
|
+
- spec/lib/oauth/client/credentials_spec.rb
|
464
|
+
- spec/lib/oauth/token_response_spec.rb
|
465
|
+
- spec/lib/oauth/client_spec.rb
|
470
466
|
- spec/lib/secret_storing/base_spec.rb
|
471
|
-
- spec/lib/secret_storing/sha256_hash_spec.rb
|
472
467
|
- spec/lib/secret_storing/bcrypt_spec.rb
|
473
|
-
- spec/lib/
|
468
|
+
- spec/lib/secret_storing/plain_spec.rb
|
469
|
+
- spec/lib/secret_storing/sha256_hash_spec.rb
|
474
470
|
- spec/lib/config_spec.rb
|
475
|
-
- spec/
|
476
|
-
- spec/
|
477
|
-
- spec/
|
478
|
-
- spec/
|
479
|
-
- spec/
|
480
|
-
- spec/
|
481
|
-
- spec/
|
482
|
-
- spec/
|
483
|
-
- spec/
|
484
|
-
- spec/support/helpers/authorization_request_helper.rb
|
485
|
-
- spec/support/helpers/model_helper.rb
|
486
|
-
- spec/support/helpers/url_helper.rb
|
487
|
-
- spec/support/helpers/config_helper.rb
|
488
|
-
- spec/support/helpers/access_token_request_helper.rb
|
489
|
-
- spec/support/helpers/request_spec_helper.rb
|
490
|
-
- spec/models/doorkeeper/access_token_spec.rb
|
491
|
-
- spec/models/doorkeeper/access_grant_spec.rb
|
492
|
-
- spec/models/doorkeeper/application_spec.rb
|
493
|
-
- spec/routing/scoped_routes_spec.rb
|
494
|
-
- spec/routing/default_routes_spec.rb
|
495
|
-
- spec/routing/custom_controller_routes_spec.rb
|
496
|
-
- spec/generators/templates/routes.rb
|
471
|
+
- spec/lib/stale_records_cleaner_spec.rb
|
472
|
+
- spec/lib/models/secret_storable_spec.rb
|
473
|
+
- spec/lib/models/revocable_spec.rb
|
474
|
+
- spec/lib/models/expirable_spec.rb
|
475
|
+
- spec/lib/models/scopes_spec.rb
|
476
|
+
- spec/lib/models/reusable_spec.rb
|
477
|
+
- spec/lib/doorkeeper_spec.rb
|
478
|
+
- spec/lib/request/strategy_spec.rb
|
479
|
+
- spec/version/version_spec.rb
|
497
480
|
- spec/spec_helper_integration.rb
|
498
|
-
- spec/
|
481
|
+
- spec/stubs/spec_helper_integration.rb
|
482
|
+
- spec/stubs/models/user.rb
|
483
|
+
- spec/stubs/support/sequel.rb
|
484
|
+
- spec/stubs/config/initializers/db.rb
|
485
|
+
- spec/stubs/config/application.rb
|
486
|
+
- spec/stubs/generators/tmp/dummy/db/migrate/20170810125729_add_previous_refresh_token_to_access_tokens.rb
|
487
|
+
- spec/helpers/doorkeeper/dashboard_helper_spec.rb
|
499
488
|
- spec/controllers/tokens_controller_spec.rb
|
500
|
-
- spec/controllers/applications_controller_spec.rb
|
501
|
-
- spec/controllers/application_metal_controller_spec.rb
|
502
489
|
- spec/controllers/protected_resources_controller_spec.rb
|
490
|
+
- spec/controllers/applications_controller_spec.rb
|
503
491
|
- spec/controllers/token_info_controller_spec.rb
|
504
492
|
- spec/controllers/authorizations_controller_spec.rb
|
505
|
-
- spec/
|
506
|
-
- spec/
|
507
|
-
- spec/
|
508
|
-
- spec/
|
509
|
-
- spec/
|
510
|
-
- spec/stubs/spec_helper_integration.rb
|
511
|
-
- spec/helpers/doorkeeper/dashboard_helper_spec.rb
|
512
|
-
- spec/dummy/config/application.rb
|
513
|
-
- spec/dummy/config/environments/production.rb
|
514
|
-
- spec/dummy/config/environments/development.rb
|
515
|
-
- spec/dummy/config/environments/test.rb
|
493
|
+
- spec/controllers/application_metal_controller_spec.rb
|
494
|
+
- spec/models/doorkeeper/application_spec.rb
|
495
|
+
- spec/models/doorkeeper/access_grant_spec.rb
|
496
|
+
- spec/models/doorkeeper/access_token_spec.rb
|
497
|
+
- spec/dummy/config.ru
|
516
498
|
- spec/dummy/config/environment.rb
|
517
|
-
- spec/dummy/config/database.yml
|
518
499
|
- spec/dummy/config/boot.rb
|
519
|
-
- spec/dummy/config/
|
520
|
-
- spec/dummy/config/
|
521
|
-
- spec/dummy/config/initializers/db.rb
|
522
|
-
- spec/dummy/config/initializers/doorkeeper.rb
|
523
|
-
- spec/dummy/config/initializers/session_store.rb
|
500
|
+
- spec/dummy/config/database.yml
|
501
|
+
- spec/dummy/config/initializers/secret_token.rb
|
524
502
|
- spec/dummy/config/initializers/backtrace_silencers.rb
|
503
|
+
- spec/dummy/config/initializers/session_store.rb
|
525
504
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
526
|
-
- spec/dummy/config/initializers/
|
527
|
-
- spec/dummy/config.
|
505
|
+
- spec/dummy/config/initializers/doorkeeper.rb
|
506
|
+
- spec/dummy/config/initializers/db.rb
|
507
|
+
- spec/dummy/config/environments/development.rb
|
508
|
+
- spec/dummy/config/environments/test.rb
|
509
|
+
- spec/dummy/config/environments/production.rb
|
510
|
+
- spec/dummy/config/application.rb
|
511
|
+
- spec/dummy/config/locales/doorkeeper.en.yml
|
512
|
+
- spec/dummy/config/routes.rb
|
513
|
+
- spec/dummy/Rakefile
|
528
514
|
- spec/dummy/script/rails
|
529
|
-
- spec/dummy/
|
530
|
-
- spec/dummy/
|
531
|
-
- spec/dummy/
|
532
|
-
- spec/dummy/
|
515
|
+
- spec/dummy/public/422.html
|
516
|
+
- spec/dummy/public/favicon.ico
|
517
|
+
- spec/dummy/public/404.html
|
518
|
+
- spec/dummy/public/500.html
|
519
|
+
- spec/dummy/app/views/home/index.html.erb
|
520
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
521
|
+
- spec/dummy/app/helpers/application_helper.rb
|
533
522
|
- spec/dummy/app/controllers/metal_controller.rb
|
523
|
+
- spec/dummy/app/controllers/full_protected_resources_controller.rb
|
534
524
|
- spec/dummy/app/controllers/application_controller.rb
|
525
|
+
- spec/dummy/app/controllers/home_controller.rb
|
535
526
|
- spec/dummy/app/controllers/semi_protected_resources_controller.rb
|
536
527
|
- spec/dummy/app/controllers/custom_authorizations_controller.rb
|
537
|
-
- spec/dummy/app/
|
538
|
-
- spec/dummy/app/
|
539
|
-
- spec/dummy/
|
540
|
-
- spec/dummy/Rakefile
|
541
|
-
- spec/dummy/db/migrate/20170822064514_enable_pkce.rb
|
542
|
-
- spec/dummy/db/migrate/20120312140401_add_password_to_users.rb
|
528
|
+
- spec/dummy/app/assets/config/manifest.js
|
529
|
+
- spec/dummy/app/models/user.rb
|
530
|
+
- spec/dummy/db/schema.rb
|
543
531
|
- spec/dummy/db/migrate/20151223200000_add_owner_to_application.rb
|
532
|
+
- spec/dummy/db/migrate/20160320211015_add_previous_refresh_token_to_access_tokens.rb
|
544
533
|
- spec/dummy/db/migrate/20180210183654_add_confidential_to_applications.rb
|
545
|
-
- spec/dummy/db/migrate/20111122132257_create_users.rb
|
546
534
|
- spec/dummy/db/migrate/20151223192035_create_doorkeeper_tables.rb
|
547
|
-
- spec/dummy/db/migrate/
|
548
|
-
- spec/dummy/db/
|
549
|
-
- spec/dummy/
|
550
|
-
- spec/
|
551
|
-
- spec/
|
552
|
-
- spec/
|
553
|
-
- spec/
|
554
|
-
- spec/
|
535
|
+
- spec/dummy/db/migrate/20120312140401_add_password_to_users.rb
|
536
|
+
- spec/dummy/db/migrate/20170822064514_enable_pkce.rb
|
537
|
+
- spec/dummy/db/migrate/20111122132257_create_users.rb
|
538
|
+
- spec/support/orm/active_record.rb
|
539
|
+
- spec/support/orm/sequel.rb
|
540
|
+
- spec/support/http_method_shim.rb
|
541
|
+
- spec/support/dependencies/factory_bot.rb
|
542
|
+
- spec/support/doorkeeper_rspec.rb
|
543
|
+
- spec/support/helpers/config_helper.rb
|
544
|
+
- spec/support/helpers/authorization_request_helper.rb
|
545
|
+
- spec/support/helpers/model_helper.rb
|
546
|
+
- spec/support/helpers/access_token_request_helper.rb
|
547
|
+
- spec/support/helpers/request_spec_helper.rb
|
548
|
+
- spec/support/helpers/url_helper.rb
|
549
|
+
- spec/support/shared/models_shared_examples.rb
|
550
|
+
- spec/support/shared/hashing_shared_context.rb
|
551
|
+
- spec/support/shared/controllers_shared_context.rb
|
552
|
+
- spec/validators/redirect_uri_validator_spec.rb
|
553
|
+
- spec/generators/templates/routes.rb
|
554
|
+
- spec/factories.rb
|
555
|
+
- spec/spec_helper.rb
|
556
|
+
- spec/requests/flows/password_spec.rb
|
557
|
+
- spec/requests/flows/authorization_code_errors_spec.rb
|
558
|
+
- spec/requests/flows/authorization_code_spec.rb
|
559
|
+
- spec/requests/flows/skip_authorization_spec.rb
|
560
|
+
- spec/requests/flows/implicit_grant_errors_spec.rb
|
561
|
+
- spec/requests/flows/client_credentials_spec.rb
|
562
|
+
- spec/requests/flows/refresh_token_spec.rb
|
563
|
+
- spec/requests/flows/revoke_token_spec.rb
|
564
|
+
- spec/requests/flows/implicit_grant_spec.rb
|
555
565
|
- spec/requests/protected_resources/metal_spec.rb
|
556
|
-
- spec/requests/
|
566
|
+
- spec/requests/protected_resources/private_api_spec.rb
|
557
567
|
- spec/requests/applications/authorized_applications_spec.rb
|
568
|
+
- spec/requests/applications/applications_request_spec.rb
|
558
569
|
- spec/requests/endpoints/token_spec.rb
|
559
570
|
- spec/requests/endpoints/authorization_spec.rb
|
560
|
-
- spec/
|
561
|
-
- spec/requests/flows/revoke_token_spec.rb
|
562
|
-
- spec/requests/flows/refresh_token_spec.rb
|
563
|
-
- spec/requests/flows/implicit_grant_spec.rb
|
564
|
-
- spec/requests/flows/authorization_code_spec.rb
|
565
|
-
- spec/requests/flows/skip_authorization_spec.rb
|
566
|
-
- spec/requests/flows/implicit_grant_errors_spec.rb
|
567
|
-
- spec/requests/flows/authorization_code_errors_spec.rb
|
568
|
-
- spec/requests/flows/password_spec.rb
|
571
|
+
- spec/grape/grape_integration_spec.rb
|