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 +4 -4
- data/.travis.yml +6 -5
- data/VERSION +1 -1
- data/lib/twitter_oauth2/client.rb +7 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 827bf119b3a6ce09f1cb0e5afd2da4cc1dada8a67ad5caffb4a1cb284276cfa1
|
4
|
+
data.tar.gz: 4add740d26df68fc78afabceb8b3015750866791650b083449b8f99e15e4e116
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51eff08e3be05ed15c69a73afafa562c585f5a32753146a8208091abe9aee515a85fe73b44fd4c5744377fda6d1d2ddc7a33289b17f94d04eac469a9327472b6
|
7
|
+
data.tar.gz: 2b18c3fb47704081604502ddda4c242de8d4c99f3f19bd14f8eb1106b6346ffd975f4c308f43b590b321dbdb77f1d97296962997eda142cc7ba8a3e512d7a71b
|
data/.travis.yml
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
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!(
|
20
|
+
def access_token!(*args)
|
21
|
+
options = args.extract_options!
|
21
22
|
super :body, {
|
22
|
-
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 =
|
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
|