doorkeeper 5.0.0.rc2 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of doorkeeper might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/NEWS.md +14 -1
- data/README.md +2 -2
- data/doorkeeper.gemspec +18 -18
- data/lib/doorkeeper/models/access_token_mixin.rb +1 -1
- data/lib/doorkeeper/oauth/authorization/token.rb +0 -2
- data/lib/doorkeeper/oauth/client_credentials/creator.rb +2 -1
- data/lib/doorkeeper/rails/routes.rb +4 -4
- data/lib/doorkeeper/version.rb +1 -1
- data/spec/controllers/authorizations_controller_spec.rb +4 -4
- data/spec/controllers/tokens_controller_spec.rb +1 -1
- data/spec/requests/flows/authorization_code_spec.rb +4 -4
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db3333346ca1b82cd7aa332bb1e43f8d979534c0
|
4
|
+
data.tar.gz: 12511ea5d14b0bba28fef47893cc925c9e45ebcd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5265ed62b206c4f9f117c3cbc8e6d905840636297a342ea952e5dfced01f7ce4bd6b59fc7efd6a4f0e6558475c566bf59ba4a793ef3f87942cf8935dde061ba
|
7
|
+
data.tar.gz: 18d2b90ae8e5f2e6e80f518fe0a251c49ba3187fda34c9213f14c0152f301dfd149d11db14dcd94a69bb8048352f8a945107c572cfb3fa03aeabc6d6383b706c
|
data/NEWS.md
CHANGED
@@ -7,7 +7,11 @@ User-visible changes worth mentioning.
|
|
7
7
|
|
8
8
|
## master
|
9
9
|
|
10
|
-
- [#] Add description
|
10
|
+
- [#PR ID] Add PR description.
|
11
|
+
|
12
|
+
## 5.0.0
|
13
|
+
|
14
|
+
- [#1127] Change the token_type initials of the Banner Token to uppercase to comply with the RFC6750 specification.
|
11
15
|
|
12
16
|
## 5.0.0.rc2
|
13
17
|
|
@@ -57,6 +61,15 @@ User-visible changes worth mentioning.
|
|
57
61
|
- Fix bug with `force_ssl_in_redirect_uri` when it breaks existing applications with an
|
58
62
|
SSL redirect_uri.
|
59
63
|
|
64
|
+
## 4.4.2
|
65
|
+
|
66
|
+
- [#1130] Backport fix for native redirect_uri from 5.x.
|
67
|
+
|
68
|
+
## 4.4.1
|
69
|
+
|
70
|
+
- [#1127] Backport token type to comply with the RFC6750 specification.
|
71
|
+
- [#1125] Backport Quote surround I18n yes/no keys
|
72
|
+
|
60
73
|
## 4.4.0
|
61
74
|
|
62
75
|
- [#1120] Backport security fix from 5.x for token revocation when using public clients
|
data/README.md
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
[![Code Climate](https://codeclimate.com/github/doorkeeper-gem/doorkeeper.svg)](https://codeclimate.com/github/doorkeeper-gem/doorkeeper)
|
6
6
|
[![Coverage Status](https://coveralls.io/repos/github/doorkeeper-gem/doorkeeper/badge.svg?branch=master)](https://coveralls.io/github/doorkeeper-gem/doorkeeper?branch=master)
|
7
7
|
[![Security](https://hakiri.io/github/doorkeeper-gem/doorkeeper/master.svg)](https://hakiri.io/github/doorkeeper-gem/doorkeeper/master)
|
8
|
+
[![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com)
|
8
9
|
|
9
10
|
Doorkeeper is a gem (Rails engine) that makes it easy to introduce OAuth 2 provider
|
10
11
|
functionality to your Ruby on Rails or Grape application.
|
@@ -179,8 +180,7 @@ end
|
|
179
180
|
```
|
180
181
|
|
181
182
|
Keep in mind, that in this mode you will not be able to access `Applications` or
|
182
|
-
`Authorized Applications` controllers because they will be skipped.
|
183
|
-
redirects will be returned as JSON response with corresponding locations.
|
183
|
+
`Authorized Applications` controllers because they will be skipped. CSRF protections (which are otherwise enabled) will be skipped, and all the redirects will be returned as JSON response with corresponding locations.
|
184
184
|
|
185
185
|
### Routes
|
186
186
|
|
data/doorkeeper.gemspec
CHANGED
@@ -1,30 +1,30 @@
|
|
1
|
-
$LOAD_PATH.push File.expand_path(
|
1
|
+
$LOAD_PATH.push File.expand_path('../lib', __FILE__)
|
2
2
|
|
3
|
-
require
|
3
|
+
require 'doorkeeper/version'
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
|
-
s.name =
|
6
|
+
s.name = 'doorkeeper'
|
7
7
|
s.version = Doorkeeper.gem_version
|
8
|
-
s.authors = [
|
8
|
+
s.authors = ['Felipe Elias Philipp', 'Tute Costa', 'Jon Moss', 'Nikita Bulai']
|
9
9
|
s.email = %w(bulaj.nikita@gmail.com)
|
10
|
-
s.homepage =
|
11
|
-
s.summary =
|
12
|
-
s.description =
|
10
|
+
s.homepage = 'https://github.com/doorkeeper-gem/doorkeeper'
|
11
|
+
s.summary = 'OAuth 2 provider for Rails and Grape'
|
12
|
+
s.description = 'Doorkeeper is an OAuth 2 provider for Rails and Grape.'
|
13
13
|
s.license = 'MIT'
|
14
14
|
|
15
15
|
s.files = `git ls-files`.split("\n")
|
16
16
|
s.test_files = `git ls-files -- spec/*`.split("\n")
|
17
|
-
s.require_paths = [
|
17
|
+
s.require_paths = ['lib']
|
18
18
|
|
19
|
-
s.add_dependency
|
20
|
-
s.required_ruby_version =
|
19
|
+
s.add_dependency 'railties', '>= 4.2'
|
20
|
+
s.required_ruby_version = '>= 2.1'
|
21
21
|
|
22
|
-
s.add_development_dependency
|
23
|
-
s.add_development_dependency
|
24
|
-
s.add_development_dependency
|
25
|
-
s.add_development_dependency
|
26
|
-
s.add_development_dependency
|
27
|
-
s.add_development_dependency
|
28
|
-
s.add_development_dependency
|
29
|
-
s.add_development_dependency
|
22
|
+
s.add_development_dependency 'capybara', '~> 2.18'
|
23
|
+
s.add_development_dependency 'coveralls'
|
24
|
+
s.add_development_dependency 'grape'
|
25
|
+
s.add_development_dependency 'database_cleaner', '~> 1.6'
|
26
|
+
s.add_development_dependency 'factory_bot', '~> 4.8'
|
27
|
+
s.add_development_dependency 'generator_spec', '~> 0.9.3'
|
28
|
+
s.add_development_dependency 'rake', '>= 11.3.0'
|
29
|
+
s.add_development_dependency 'rspec-rails'
|
30
30
|
end
|
@@ -44,11 +44,11 @@ module Doorkeeper
|
|
44
44
|
private
|
45
45
|
|
46
46
|
def map_route(name, method)
|
47
|
-
|
48
|
-
send(method, @mapping[name])
|
47
|
+
return if @mapping.skipped?(name)
|
49
48
|
|
50
|
-
|
51
|
-
|
49
|
+
send(method, @mapping[name])
|
50
|
+
|
51
|
+
mapping[name] = @mapping[name]
|
52
52
|
end
|
53
53
|
|
54
54
|
def authorization_routes(mapping)
|
data/lib/doorkeeper/version.rb
CHANGED
@@ -57,7 +57,7 @@ describe Doorkeeper::AuthorizationsController, 'implicit grant flow' do
|
|
57
57
|
end
|
58
58
|
|
59
59
|
it 'includes token type in fragment' do
|
60
|
-
expect(response.query_params['token_type']).to eq('
|
60
|
+
expect(response.query_params['token_type']).to eq('Bearer')
|
61
61
|
end
|
62
62
|
|
63
63
|
it 'includes token expiration in fragment' do
|
@@ -95,7 +95,7 @@ describe Doorkeeper::AuthorizationsController, 'implicit grant flow' do
|
|
95
95
|
end
|
96
96
|
|
97
97
|
it "includes token type in fragment" do
|
98
|
-
expect(redirect_uri.match(/token_type=(\w+)&?/)[1]).to eq "
|
98
|
+
expect(redirect_uri.match(/token_type=(\w+)&?/)[1]).to eq "Bearer"
|
99
99
|
end
|
100
100
|
|
101
101
|
it "includes token expiration in fragment" do
|
@@ -293,7 +293,7 @@ describe Doorkeeper::AuthorizationsController, 'implicit grant flow' do
|
|
293
293
|
end
|
294
294
|
|
295
295
|
it 'includes token type in fragment' do
|
296
|
-
expect(response.query_params['token_type']).to eq('
|
296
|
+
expect(response.query_params['token_type']).to eq('Bearer')
|
297
297
|
end
|
298
298
|
|
299
299
|
it 'includes token expiration in fragment' do
|
@@ -355,7 +355,7 @@ describe Doorkeeper::AuthorizationsController, 'implicit grant flow' do
|
|
355
355
|
it "sets redirect_uri to correct value" do
|
356
356
|
redirect_uri = JSON.parse(response.body)["redirect_uri"]
|
357
357
|
expect(redirect_uri).to_not be_nil
|
358
|
-
expect(redirect_uri.match(/token_type=(\w+)&?/)[1]).to eq "
|
358
|
+
expect(redirect_uri.match(/token_type=(\w+)&?/)[1]).to eq "Bearer"
|
359
359
|
expect(redirect_uri.match(/expires_in=(\d+)&?/)[1].to_i).to eq 1234
|
360
360
|
expect(
|
361
361
|
redirect_uri.match(/access_token=([a-f0-9]+)&?/)[1]
|
@@ -33,7 +33,7 @@ describe Doorkeeper::TokensController do
|
|
33
33
|
allow(I18n).to receive(:translate).
|
34
34
|
with(
|
35
35
|
custom_message,
|
36
|
-
hash_including(scope: %i[doorkeeper errors messages])
|
36
|
+
hash_including(scope: %i[doorkeeper errors messages])
|
37
37
|
).
|
38
38
|
and_return('Authorization custom message')
|
39
39
|
|
@@ -54,7 +54,7 @@ feature 'Authorization Code Flow' do
|
|
54
54
|
should_not_have_json 'error'
|
55
55
|
|
56
56
|
should_have_json 'access_token', Doorkeeper::AccessToken.first.token
|
57
|
-
should_have_json 'token_type', '
|
57
|
+
should_have_json 'token_type', 'Bearer'
|
58
58
|
should_have_json_within 'expires_in', Doorkeeper::AccessToken.first.expires_in, 1
|
59
59
|
end
|
60
60
|
|
@@ -107,7 +107,7 @@ feature 'Authorization Code Flow' do
|
|
107
107
|
should_not_have_json 'error'
|
108
108
|
|
109
109
|
should_have_json 'access_token', Doorkeeper::AccessToken.first.token
|
110
|
-
should_have_json 'token_type', '
|
110
|
+
should_have_json 'token_type', 'Bearer'
|
111
111
|
should_have_json_within 'expires_in', Doorkeeper::AccessToken.first.expires_in, 1
|
112
112
|
end
|
113
113
|
|
@@ -150,7 +150,7 @@ feature 'Authorization Code Flow' do
|
|
150
150
|
should_not_have_json 'error'
|
151
151
|
|
152
152
|
should_have_json 'access_token', Doorkeeper::AccessToken.first.token
|
153
|
-
should_have_json 'token_type', '
|
153
|
+
should_have_json 'token_type', 'Bearer'
|
154
154
|
should_have_json_within 'expires_in', Doorkeeper::AccessToken.first.expires_in, 1
|
155
155
|
end
|
156
156
|
|
@@ -185,7 +185,7 @@ feature 'Authorization Code Flow' do
|
|
185
185
|
should_not_have_json 'error'
|
186
186
|
|
187
187
|
should_have_json 'access_token', Doorkeeper::AccessToken.first.token
|
188
|
-
should_have_json 'token_type', '
|
188
|
+
should_have_json 'token_type', 'Bearer'
|
189
189
|
should_have_json_within 'expires_in', Doorkeeper::AccessToken.first.expires_in, 1
|
190
190
|
end
|
191
191
|
|
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.0
|
4
|
+
version: 5.0.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: 2018-
|
14
|
+
date: 2018-08-24 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: railties
|
@@ -427,9 +427,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
427
427
|
version: '2.1'
|
428
428
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
429
429
|
requirements:
|
430
|
-
- - "
|
430
|
+
- - ">="
|
431
431
|
- !ruby/object:Gem::Version
|
432
|
-
version:
|
432
|
+
version: '0'
|
433
433
|
requirements: []
|
434
434
|
rubyforge_project:
|
435
435
|
rubygems_version: 2.6.11
|