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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f9a6bf0cb64c84923dedcc19d31136a03cb7fab0
4
- data.tar.gz: ee93150982920fc8fb654b2e447d755e42191d9c
3
+ metadata.gz: db3333346ca1b82cd7aa332bb1e43f8d979534c0
4
+ data.tar.gz: 12511ea5d14b0bba28fef47893cc925c9e45ebcd
5
5
  SHA512:
6
- metadata.gz: d66636e7818c25feab19f577ee2d344f0fac658906253c18c33e884ff063bc75f0461aa0a2ddb6305404501d58b321916fc64d48be5da4917e0fe1bfb1f1c600
7
- data.tar.gz: f439482a6a560f1e70453e0a69fd1b468c640f2287fe0d2e5a90fad315214eeef01731235931d57aba3ed29ac85eaed2165e6e072a8c9e5b3792f2c4b7cc4392
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 here
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. Also all the
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
 
@@ -1,30 +1,30 @@
1
- $LOAD_PATH.push File.expand_path("../lib", __FILE__)
1
+ $LOAD_PATH.push File.expand_path('../lib', __FILE__)
2
2
 
3
- require "doorkeeper/version"
3
+ require 'doorkeeper/version'
4
4
 
5
5
  Gem::Specification.new do |s|
6
- s.name = "doorkeeper"
6
+ s.name = 'doorkeeper'
7
7
  s.version = Doorkeeper.gem_version
8
- s.authors = ["Felipe Elias Philipp", "Tute Costa", "Jon Moss", "Nikita Bulai"]
8
+ s.authors = ['Felipe Elias Philipp', 'Tute Costa', 'Jon Moss', 'Nikita Bulai']
9
9
  s.email = %w(bulaj.nikita@gmail.com)
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."
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 = ["lib"]
17
+ s.require_paths = ['lib']
18
18
 
19
- s.add_dependency "railties", ">= 4.2"
20
- s.required_ruby_version = ">= 2.1"
19
+ s.add_dependency 'railties', '>= 4.2'
20
+ s.required_ruby_version = '>= 2.1'
21
21
 
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"
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
@@ -173,7 +173,7 @@ module Doorkeeper
173
173
  # The OAuth 2.0 Authorization Framework: Bearer Token Usage
174
174
  #
175
175
  def token_type
176
- 'bearer'
176
+ 'Bearer'
177
177
  end
178
178
 
179
179
  def use_refresh_token?
@@ -34,8 +34,6 @@ module Doorkeeper
34
34
  !!server.refresh_token_enabled?
35
35
  end
36
36
  end
37
-
38
- private
39
37
  end
40
38
 
41
39
  def initialize(pre_auth, resource_owner)
@@ -5,7 +5,8 @@ module Doorkeeper
5
5
  def call(client, scopes, attributes = {})
6
6
  AccessToken.find_or_create_for(
7
7
  client, nil, scopes, attributes[:expires_in],
8
- attributes[:use_refresh_token])
8
+ attributes[:use_refresh_token]
9
+ )
9
10
  end
10
11
  end
11
12
  end
@@ -44,11 +44,11 @@ module Doorkeeper
44
44
  private
45
45
 
46
46
  def map_route(name, method)
47
- unless @mapping.skipped?(name)
48
- send(method, @mapping[name])
47
+ return if @mapping.skipped?(name)
49
48
 
50
- mapping[name] = @mapping[name]
51
- end
49
+ send(method, @mapping[name])
50
+
51
+ mapping[name] = @mapping[name]
52
52
  end
53
53
 
54
54
  def authorization_routes(mapping)
@@ -8,7 +8,7 @@ module Doorkeeper
8
8
  MAJOR = 5
9
9
  MINOR = 0
10
10
  TINY = 0
11
- PRE = 'rc2'
11
+ PRE = nil
12
12
 
13
13
  # Full version number
14
14
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
@@ -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('bearer')
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 "bearer"
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('bearer')
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 "bearer"
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', 'bearer'
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', 'bearer'
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', 'bearer'
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', 'bearer'
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.rc2
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-07-17 00:00:00.000000000 Z
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: 1.3.1
432
+ version: '0'
433
433
  requirements: []
434
434
  rubyforge_project:
435
435
  rubygems_version: 2.6.11