twitter_oauth2 0.1.0 → 0.2.0

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: 1d6415db5f928fd04caf2f787b1a1b99ca9d7c1498a6a46ffea311f91243f517
4
- data.tar.gz: f7019063e3d717403ce74f9424cf859f869f6e61c097a8ec5aeb1575cb3c97a6
3
+ metadata.gz: 827bf119b3a6ce09f1cb0e5afd2da4cc1dada8a67ad5caffb4a1cb284276cfa1
4
+ data.tar.gz: 4add740d26df68fc78afabceb8b3015750866791650b083449b8f99e15e4e116
5
5
  SHA512:
6
- metadata.gz: a0c5a13f221bfbbbd2235fb3d27d55a01c26183a9bf0bb178c61122019ecf0488662daed083e7feb776056ea9ec59be0d0f20ae3298a0d8b38b4eddd3e1bb565
7
- data.tar.gz: cfe02be16384a8da3a6f08c3f53d80b2b1e0647b9fb3e4d9c6c8600857d90990edb7ea713a632ee11a07846e036d9ef44320b00d4c3365aa37a152a6125ceb36
6
+ metadata.gz: 51eff08e3be05ed15c69a73afafa562c585f5a32753146a8208091abe9aee515a85fe73b44fd4c5744377fda6d1d2ddc7a33289b17f94d04eac469a9327472b6
7
+ data.tar.gz: 2b18c3fb47704081604502ddda4c242de8d4c99f3f19bd14f8eb1106b6346ffd975f4c308f43b590b321dbdb77f1d97296962997eda142cc7ba8a3e512d7a71b
data/.travis.yml CHANGED
@@ -1,6 +1,7 @@
1
- ---
2
- language: ruby
3
- cache: bundler
1
+ before_install:
2
+ - gem install bundler
3
+
4
4
  rvm:
5
- - 2.7.2
6
- before_install: gem install bundler -v 2.2.28
5
+ - 2.5.8
6
+ - 2.6.6
7
+ - 2.7.2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.0
@@ -17,16 +17,20 @@ module TwitterOAuth2
17
17
  [authorization_uri, code_verifier]
18
18
  end
19
19
 
20
- def access_token!(code_verifier, options = {})
20
+ def access_token!(*args)
21
+ options = args.extract_options!
21
22
  super :body, {
22
- code_verifier: code_verifier
23
+ code_verifier: args.first
23
24
  }.merge(options)
24
25
  end
25
26
 
26
27
  private
27
28
 
28
29
  def setup_pkce_session
29
- code_verifier = SecureRandom.hex(8)
30
+ code_verifier = Base64.urlsafe_encode64(
31
+ SecureRandom.random_bytes(32),
32
+ padding: false
33
+ )
30
34
  code_challenge = Base64.urlsafe_encode64(
31
35
  OpenSSL::Digest::SHA256.digest(code_verifier),
32
36
  padding: false
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter_oauth2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - nov