oauth2 2.0.0.rc2 → 2.0.0.rc3
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/CHANGELOG.md +5 -2
- data/lib/oauth2/client.rb +3 -3
- data/lib/oauth2/version.rb +1 -57
- data/lib/oauth2.rb +5 -0
- metadata +20 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e2faffc19628919996428503133639534edbd8b3de6924811665c73bd24629d
|
4
|
+
data.tar.gz: 20d14dffb4e3ef670ee62762d73cf64e1e8312520c57a6d6602a27f623a27da8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51e8ddd541f7197a3e6d08f35cfc09b7839218e3b4022bea854930fe49a78fe38f26c76c40f70be61f39282efa6c6a1ca7bcb5515a889dea6eb5bd9e3d6cb515
|
7
|
+
data.tar.gz: 46fa2325488eb90f8133806f90a6a6eb734d1b9fd25998d5dfdb2e690babbfe30d0d6f5112e57e33fed64fbb50b1ca24d1ea922adc00cd2819a3746c703650c8
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# Changelog
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
-
The format (since v2
|
4
|
+
The format (since v2) is based on [Keep a Changelog v1](https://keepachangelog.com/en/1.0.0/),
|
5
5
|
and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
-
## [
|
7
|
+
## [2.0.0.rc3] - 2022-06-16
|
8
8
|
### Added
|
9
9
|
- [#158](https://github.com/oauth-xx/oauth2/pull/158), [#344](https://github.com/oauth-xx/oauth2/pull/344) - Optionally pass raw response to parsers (@niels)
|
10
10
|
- [#190](https://github.com/oauth-xx/oauth2/pull/190), [#332](https://github.com/oauth-xx/oauth2/pull/332), [#334](https://github.com/oauth-xx/oauth2/pull/334), [#335](https://github.com/oauth-xx/oauth2/pull/335), [#360](https://github.com/oauth-xx/oauth2/pull/360), [#426](https://github.com/oauth-xx/oauth2/pull/426), [#427](https://github.com/oauth-xx/oauth2/pull/427), [#461](https://github.com/oauth-xx/oauth2/pull/461) - Documentation (@josephpage, @pboling, @meganemura, @joshRpowell, @elliotcm)
|
@@ -60,6 +60,9 @@ and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.
|
|
60
60
|
- [#472](https://github.com/oauth-xx/oauth2/pull/472) - **Security**: Add checks to enforce `client_secret` is *never* passed in authorize_url query params for `implicit` and `auth_code` grant types (@dfockler)
|
61
61
|
- [#482](https://github.com/oauth-xx/oauth2/pull/482) - _Documentation_: Update last of `intridea` links to `oauth-xx` (@pboling)
|
62
62
|
- [#536](https://github.com/oauth-xx/oauth2/pull/536) - **Security**: Compatibility with more (and recent) Ruby OpenSSL versions, Github Actions, Rubocop updated, analogous to [#535](https://github.com/oauth-xx/oauth2/pull/535) on `1-4-stable` branch (@pboling)
|
63
|
+
- [#595](https://github.com/oauth-xx/oauth2/pull/595) - Graceful handling of empty responses from `Client#get_token`, respecting `:raise_errors` config (@stanhu)
|
64
|
+
- [#596](https://github.com/oauth-xx/oauth2/pull/596) - Consistency between `AccessToken#refresh` and `Client#get_token` named arguments (@stanhu)
|
65
|
+
- [#598](https://github.com/oauth-xx/oauth2/pull/598) - Fix unparseable data not raised as error in `Client#get_token`, respecting `:raise_errors` config (@stanhu)
|
63
66
|
### Removed
|
64
67
|
- [#341](https://github.com/oauth-xx/oauth2/pull/341) - Remove Rdoc & Jeweler related files (@josephpage)
|
65
68
|
- [#342](https://github.com/oauth-xx/oauth2/pull/342) - **BREAKING**: Dropped support for Ruby 1.8 (@josephpage)
|
data/lib/oauth2/client.rb
CHANGED
@@ -273,13 +273,13 @@ module OAuth2
|
|
273
273
|
def parse_response(response, access_token_opts, access_token_class)
|
274
274
|
data = response.parsed
|
275
275
|
|
276
|
-
|
276
|
+
unless data.is_a?(Hash) && access_token_class.contains_token?(data)
|
277
|
+
return unless options[:raise_errors]
|
278
|
+
|
277
279
|
error = Error.new(response)
|
278
280
|
raise(error)
|
279
281
|
end
|
280
282
|
|
281
|
-
return unless data.is_a?(Hash)
|
282
|
-
|
283
283
|
build_access_token(response, access_token_opts, access_token_class)
|
284
284
|
end
|
285
285
|
|
data/lib/oauth2/version.rb
CHANGED
@@ -2,62 +2,6 @@
|
|
2
2
|
|
3
3
|
module OAuth2
|
4
4
|
module Version
|
5
|
-
VERSION = '2.0.0.
|
6
|
-
|
7
|
-
module_function
|
8
|
-
|
9
|
-
# The version number as a string
|
10
|
-
#
|
11
|
-
# @return [String]
|
12
|
-
def to_s
|
13
|
-
VERSION
|
14
|
-
end
|
15
|
-
|
16
|
-
# The major version
|
17
|
-
#
|
18
|
-
# @return [Integer]
|
19
|
-
def major
|
20
|
-
to_a[0].to_i
|
21
|
-
end
|
22
|
-
|
23
|
-
# The minor version
|
24
|
-
#
|
25
|
-
# @return [Integer]
|
26
|
-
def minor
|
27
|
-
to_a[1].to_i
|
28
|
-
end
|
29
|
-
|
30
|
-
# The patch version
|
31
|
-
#
|
32
|
-
# @return [Integer]
|
33
|
-
def patch
|
34
|
-
to_a[2].to_i
|
35
|
-
end
|
36
|
-
|
37
|
-
# The pre-release version, if any
|
38
|
-
#
|
39
|
-
# @return [String, NilClass]
|
40
|
-
def pre
|
41
|
-
to_a[3]
|
42
|
-
end
|
43
|
-
|
44
|
-
# The version number as a hash
|
45
|
-
#
|
46
|
-
# @return [Hash]
|
47
|
-
def to_h
|
48
|
-
{
|
49
|
-
major: major,
|
50
|
-
minor: minor,
|
51
|
-
patch: patch,
|
52
|
-
pre: pre,
|
53
|
-
}
|
54
|
-
end
|
55
|
-
|
56
|
-
# The version number as an array
|
57
|
-
#
|
58
|
-
# @return [Array]
|
59
|
-
def to_a
|
60
|
-
VERSION.split('.')
|
61
|
-
end
|
5
|
+
VERSION = '2.0.0.rc3'.freeze
|
62
6
|
end
|
63
7
|
end
|
data/lib/oauth2.rb
CHANGED
@@ -6,6 +6,7 @@ require 'time'
|
|
6
6
|
|
7
7
|
# third party gems
|
8
8
|
require 'rash'
|
9
|
+
require 'version_gem'
|
9
10
|
|
10
11
|
# includes gem files
|
11
12
|
require 'oauth2/version'
|
@@ -25,3 +26,7 @@ require 'oauth2/response'
|
|
25
26
|
# The namespace of this library
|
26
27
|
module OAuth2
|
27
28
|
end
|
29
|
+
|
30
|
+
OAuth2::Version.class_eval do
|
31
|
+
extend VersionGem::Basic
|
32
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oauth2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.rc3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Boling
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2022-06-
|
13
|
+
date: 2022-06-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: faraday
|
@@ -106,6 +106,20 @@ dependencies:
|
|
106
106
|
- - "<"
|
107
107
|
- !ruby/object:Gem::Version
|
108
108
|
version: '1'
|
109
|
+
- !ruby/object:Gem::Dependency
|
110
|
+
name: version_gem
|
111
|
+
requirement: !ruby/object:Gem::Requirement
|
112
|
+
requirements:
|
113
|
+
- - "~>"
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: '1.0'
|
116
|
+
type: :runtime
|
117
|
+
prerelease: false
|
118
|
+
version_requirements: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
120
|
+
- - "~>"
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '1.0'
|
109
123
|
- !ruby/object:Gem::Dependency
|
110
124
|
name: addressable
|
111
125
|
requirement: !ruby/object:Gem::Requirement
|
@@ -293,10 +307,10 @@ licenses:
|
|
293
307
|
- MIT
|
294
308
|
metadata:
|
295
309
|
homepage_uri: https://github.com/oauth-xx/oauth2
|
296
|
-
source_code_uri: https://github.com/oauth-xx/oauth2/tree/v2.0.0.
|
297
|
-
changelog_uri: https://github.com/oauth-xx/oauth2/blob/v2.0.0.
|
310
|
+
source_code_uri: https://github.com/oauth-xx/oauth2/tree/v2.0.0.rc3
|
311
|
+
changelog_uri: https://github.com/oauth-xx/oauth2/blob/v2.0.0.rc3/CHANGELOG.md
|
298
312
|
bug_tracker_uri: https://github.com/oauth-xx/oauth2/issues
|
299
|
-
documentation_uri: https://www.rubydoc.info/gems/oauth2/2.0.0.
|
313
|
+
documentation_uri: https://www.rubydoc.info/gems/oauth2/2.0.0.rc3
|
300
314
|
wiki_uri: https://github.com/oauth-xx/oauth2/wiki
|
301
315
|
rubygems_mfa_required: 'true'
|
302
316
|
post_install_message:
|
@@ -314,7 +328,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
314
328
|
- !ruby/object:Gem::Version
|
315
329
|
version: 1.3.1
|
316
330
|
requirements: []
|
317
|
-
rubygems_version: 3.3.
|
331
|
+
rubygems_version: 3.3.16
|
318
332
|
signing_key:
|
319
333
|
specification_version: 4
|
320
334
|
summary: A Ruby wrapper for the OAuth 2.0 protocol.
|