oauth2 1.4.3 → 1.4.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d268c85a1429a82d674a4acab6c89cd9b3b64044c2629ce321f5a0aba9f0f1e9
4
- data.tar.gz: 9aa05cb486902e77eadcb801cfc36febb48707cda62ae76899398876cbe312d9
3
+ metadata.gz: b97977a64f018ee795bce70e2b670bac5d50c731c8f206f1ff9d074c29be1192
4
+ data.tar.gz: 3d11d9da6bd69267f571e01077e776f07deae6d0411e71493061faa22bbfd694
5
5
  SHA512:
6
- metadata.gz: f9684210662ed503a26ba29ee7f0049afcd1ff3c185fe008c0b78cf3a5822dc10f2010b7d38ac7bde7eea479e3f7e3828b329c8bbecf54c3da3d2280be00dcd7
7
- data.tar.gz: 8e9e3503c15112cada5c355e28f1ab5068b302768e5ad2fad4204e574712bccf0387edda4d410fb3fb67c25d3850b1e1d032a342e0ace183871efded3115061d
6
+ metadata.gz: 2931c2d95bb544b4af8ad3415c4be029733042cb1e959c11427344e062bcd59fab97293371241843cca9b7ba92b1ef7ef148f687f91ba36df5d4c94cf6dd9c5d
7
+ data.tar.gz: 9db9d4e0bb93eff4c83e567abcf1c6c3b59023d1d8eaccb3f7e2762809e2ac6278288c56a3aafc3f812ceb946c6a84840d65172428e89dda9b608ee248676c55
@@ -5,11 +5,16 @@ All notable changes to this project will be documented in this file.
5
5
 
6
6
  - no changes yet
7
7
 
8
+ ## [1.4.4] - 2020-02-12
9
+
10
+ - [#408](https://github.com/oauth-xx/oauth2/pull/408) - Fixed expires_at for formatted time (@Lomey)
11
+
8
12
  ## [1.4.3] - 2020-01-29
9
13
 
10
14
  - [#483](https://github.com/oauth-xx/oauth2/pull/483) - add project metadata to gemspec (@orien)
11
15
  - [#495](https://github.com/oauth-xx/oauth2/pull/495) - support additional types of access token requests (@SteveyblamFreeagent, @thomcorley, @dgholz)
12
16
  - Adds support for private_key_jwt and tls_client_auth
17
+ - [#433](https://github.com/oauth-xx/oauth2/pull/433) - allow field names with square brackets and numbers in params (@asm256)
13
18
 
14
19
  ## [1.4.2] - 2019-10-01
15
20
 
data/README.md CHANGED
@@ -4,6 +4,7 @@ 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.4 | Feb 12, 2020 | https://github.com/oauth-xx/oauth2/blob/v1.4.4/README.md |
7
8
  | 1.4.3 | Jan 29, 2020 | https://github.com/oauth-xx/oauth2/blob/v1.4.3/README.md |
8
9
  | 1.4.2 | Oct 1, 2019 | https://github.com/oauth-xx/oauth2/blob/v1.4.2/README.md |
9
10
  | 1.4.1 | Oct 13, 2018 | https://github.com/oauth-xx/oauth2/blob/v1.4.1/README.md |
@@ -46,7 +46,7 @@ module OAuth2
46
46
  end
47
47
  @expires_in ||= opts.delete('expires')
48
48
  @expires_in &&= @expires_in.to_i
49
- @expires_at &&= @expires_at.to_i
49
+ @expires_at &&= convert_expires_at(@expires_at)
50
50
  @expires_at ||= Time.now.to_i + @expires_in if @expires_in
51
51
  @options = {:mode => opts.delete(:mode) || :header,
52
52
  :header_format => opts.delete(:header_format) || 'Bearer %s',
@@ -169,5 +169,12 @@ module OAuth2
169
169
  raise("invalid :mode option of #{options[:mode]}")
170
170
  end
171
171
  end
172
+
173
+ def convert_expires_at(expires_at)
174
+ expires_at_i = expires_at.to_i
175
+ return expires_at_i if expires_at_i > Time.now.utc.to_i
176
+ return Time.parse(expires_at).to_i if expires_at.is_a?(String)
177
+ expires_at_i
178
+ end
172
179
  end
173
180
  end
@@ -20,7 +20,7 @@ module OAuth2
20
20
  #
21
21
  # @return [Integer]
22
22
  def patch
23
- 3
23
+ 4
24
24
  end
25
25
 
26
26
  # The pre-release version, if any
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.3
4
+ version: 1.4.4
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: 2020-01-29 00:00:00.000000000 Z
13
+ date: 2020-02-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: faraday
@@ -334,9 +334,9 @@ licenses:
334
334
  - MIT
335
335
  metadata:
336
336
  bug_tracker_uri: https://github.com/oauth-xx/oauth2/issues
337
- changelog_uri: https://github.com/oauth-xx/oauth2/blob/v1.4.3/CHANGELOG.md
338
- documentation_uri: https://www.rubydoc.info/gems/oauth2/1.4.3
339
- source_code_uri: https://github.com/oauth-xx/oauth2/tree/v1.4.3
337
+ changelog_uri: https://github.com/oauth-xx/oauth2/blob/v1.4.4/CHANGELOG.md
338
+ documentation_uri: https://www.rubydoc.info/gems/oauth2/1.4.4
339
+ source_code_uri: https://github.com/oauth-xx/oauth2/tree/v1.4.4
340
340
  wiki_uri: https://github.com/oauth-xx/oauth2/wiki
341
341
  post_install_message:
342
342
  rdoc_options: []