oauth2 1.4.5 → 1.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -1
- data/README.md +4 -0
- data/lib/oauth2/client.rb +16 -16
- data/lib/oauth2/version.rb +2 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7912a62b5b26c6c8cdedaf620194ef0d2a0adbd92307da9fe29b77d88c984b34
|
4
|
+
data.tar.gz: 83bd964f93de41cd8ede2e8fdcf9aa037ff5d779ba7d922589d5cb666fe8c1c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b18270faea191ac365fc6c63e350bd94a4180d1d64966c2eb6f59c2fd3131e7175df62e8179dba257661447fa7ec4d222ba166ee5ddab9fec4b29340629ed81
|
7
|
+
data.tar.gz: 8bf6ed52a51b03aba99af5ea24c63a13a6f548708ac05e88f4c19a6813211d01bacc1f60b0505ad7bba1e21425b6ff7817dee2cf1424605eed27b1aaf76e86eb
|
data/CHANGELOG.md
CHANGED
@@ -3,7 +3,13 @@ All notable changes to this project will be documented in this file.
|
|
3
3
|
|
4
4
|
## unreleased
|
5
5
|
|
6
|
-
## [1.4.
|
6
|
+
## [1.4.6] - 2021-03-18
|
7
|
+
|
8
|
+
|
9
|
+
- [#537](https://github.com/oauth-xx/oauth2/pull/537) - Fix crash in OAuth2::Client#get_token (@anderscarling)
|
10
|
+
- [#538](https://github.com/oauth-xx/oauth2/pull/538) - Remove reliance on globally included OAuth2 in tests for version 1.4 (@anderscarling)
|
11
|
+
|
12
|
+
## [1.4.5] - 2021-03-18
|
7
13
|
|
8
14
|
- [#535](https://github.com/oauth-xx/oauth2/pull/535) - Compatibility with range of supported Ruby OpenSSL versions, Rubocop updates, Github Actions (@pboling)
|
9
15
|
- [#518](https://github.com/oauth-xx/oauth2/pull/518) - Add extract_access_token option to OAuth2::Client (@jonspalmer)
|
data/README.md
CHANGED
@@ -4,6 +4,8 @@ If you need the readme for a released version of the gem please find it below:
|
|
4
4
|
|
5
5
|
| Version | Release Date | Readme |
|
6
6
|
|----------|--------------|----------------------------------------------------------|
|
7
|
+
| 1.4.6 | Mar 18, 2021 | https://github.com/oauth-xx/oauth2/blob/v1.4.6/README.md |
|
8
|
+
| 1.4.5 | Mar 18, 2021 | https://github.com/oauth-xx/oauth2/blob/v1.4.5/README.md |
|
7
9
|
| 1.4.4 | Feb 12, 2020 | https://github.com/oauth-xx/oauth2/blob/v1.4.4/README.md |
|
8
10
|
| 1.4.3 | Jan 29, 2020 | https://github.com/oauth-xx/oauth2/blob/v1.4.3/README.md |
|
9
11
|
| 1.4.2 | Oct 1, 2019 | https://github.com/oauth-xx/oauth2/blob/v1.4.2/README.md |
|
@@ -20,6 +22,7 @@ If you need the readme for a released version of the gem please find it below:
|
|
20
22
|
[![Total Downloads](https://img.shields.io/gem/dt/oauth2.svg)][gem]
|
21
23
|
[![Downloads Today](https://img.shields.io/gem/rt/oauth2.svg)][gem]
|
22
24
|
[![Build Status](https://travis-ci.org/oauth-xx/oauth2.svg?branch=1-4-stable)][travis]
|
25
|
+
[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Foauth-xx%2Foauth2%2Fbadge&style=flat)][github-actions]
|
23
26
|
[![Test Coverage](https://api.codeclimate.com/v1/badges/688c612528ff90a46955/test_coverage)][codeclimate-coverage]
|
24
27
|
[![Maintainability](https://api.codeclimate.com/v1/badges/688c612528ff90a46955/maintainability)][codeclimate-maintainability]
|
25
28
|
[![Depfu](https://badges.depfu.com/badges/6d34dc1ba682bbdf9ae2a97848241743/count.svg)][depfu]
|
@@ -30,6 +33,7 @@ If you need the readme for a released version of the gem please find it below:
|
|
30
33
|
|
31
34
|
[gem]: https://rubygems.org/gems/oauth2
|
32
35
|
[travis]: http://travis-ci.org/oauth-xx/oauth2
|
36
|
+
[github-actions]: https://actions-badge.atrox.dev/oauth-xx/oauth2/goto
|
33
37
|
[coveralls]: https://coveralls.io/r/oauth-xx/oauth2
|
34
38
|
[codeclimate-maintainability]: https://codeclimate.com/github/oauth-xx/oauth2/maintainability
|
35
39
|
[codeclimate-coverage]: https://codeclimate.com/github/oauth-xx/oauth2/test_coverage
|
data/lib/oauth2/client.rb
CHANGED
@@ -231,27 +231,27 @@ module OAuth2
|
|
231
231
|
{}
|
232
232
|
end
|
233
233
|
end
|
234
|
-
end
|
235
234
|
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
235
|
+
DEFAULT_EXTRACT_ACCESS_TOKEN = proc do |client, hash|
|
236
|
+
token = hash.delete('access_token') || hash.delete(:access_token)
|
237
|
+
token && AccessToken.new(client, token, hash)
|
238
|
+
end
|
240
239
|
|
241
|
-
private
|
240
|
+
private
|
242
241
|
|
243
|
-
|
244
|
-
|
245
|
-
|
242
|
+
def build_access_token(response, access_token_opts, extract_access_token)
|
243
|
+
parsed_response = response.parsed.dup
|
244
|
+
return unless parsed_response.is_a?(Hash)
|
246
245
|
|
247
|
-
|
246
|
+
hash = parsed_response.merge(access_token_opts)
|
248
247
|
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
248
|
+
# Provide backwards compatibility for old AcessToken.form_hash pattern
|
249
|
+
# Should be deprecated in 2.x
|
250
|
+
if extract_access_token.is_a?(Class) && extract_access_token.respond_to?(:from_hash)
|
251
|
+
extract_access_token.from_hash(self, hash)
|
252
|
+
else
|
253
|
+
extract_access_token.call(self, hash)
|
254
|
+
end
|
255
255
|
end
|
256
256
|
end
|
257
257
|
end
|
data/lib/oauth2/version.rb
CHANGED
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: 1.4.
|
4
|
+
version: 1.4.6
|
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: 2021-03-
|
13
|
+
date: 2021-03-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: faraday
|
@@ -331,9 +331,9 @@ licenses:
|
|
331
331
|
- MIT
|
332
332
|
metadata:
|
333
333
|
bug_tracker_uri: https://github.com/oauth-xx/oauth2/issues
|
334
|
-
changelog_uri: https://github.com/oauth-xx/oauth2/blob/v1.4.
|
335
|
-
documentation_uri: https://www.rubydoc.info/gems/oauth2/1.4.
|
336
|
-
source_code_uri: https://github.com/oauth-xx/oauth2/tree/v1.4.
|
334
|
+
changelog_uri: https://github.com/oauth-xx/oauth2/blob/v1.4.6/CHANGELOG.md
|
335
|
+
documentation_uri: https://www.rubydoc.info/gems/oauth2/1.4.6
|
336
|
+
source_code_uri: https://github.com/oauth-xx/oauth2/tree/v1.4.6
|
337
337
|
wiki_uri: https://github.com/oauth-xx/oauth2/wiki
|
338
338
|
post_install_message:
|
339
339
|
rdoc_options: []
|