authkeeper 0.1.23 → 0.1.24
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2dc682fbb1599d8a2332b611587d45371b5e175d248010f3ebd9336401bdc733
|
|
4
|
+
data.tar.gz: 94594e0b29e03d9e8d60dacce9ead1fd17731140b78d886c06079c72422d13cb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 515907769a1249e7c25f5aa3e38067fad66be8f2a7b50cdcd52ce539f2ba0c4247da1a7824c3f3fba9c9aa7f24a52bada417a4ee2f8aaff625771ea5bcba664b
|
|
7
|
+
data.tar.gz: 2020b2d354085ca69f4cedc9c8f2a71f6df3d97afe87ff04eb833afa68b48e54944695c9f6103d922ec36dffd675673d5777d68368fc8c74f5f34732beb03490
|
|
@@ -48,7 +48,7 @@ module Authkeeper
|
|
|
48
48
|
response.body if response.success?
|
|
49
49
|
end
|
|
50
50
|
|
|
51
|
-
def form_post(path:, body: {}, params: {}, headers: {})
|
|
51
|
+
def form_post(path:, body: {}, params: {}, headers: {}, return_raw_response: false)
|
|
52
52
|
if Rails.env.test? && connection.adapter != 'Faraday::Adapter::Test'
|
|
53
53
|
raise StandardError, 'please stub request in test env'
|
|
54
54
|
end
|
|
@@ -62,6 +62,8 @@ module Authkeeper
|
|
|
62
62
|
end
|
|
63
63
|
request.body = URI.encode_www_form(body)
|
|
64
64
|
end
|
|
65
|
+
return response if return_raw_response
|
|
66
|
+
|
|
65
67
|
response.body if response.success?
|
|
66
68
|
end
|
|
67
69
|
# rubocop: enable Metrics/AbcSize
|
|
@@ -4,7 +4,7 @@ module Authkeeper
|
|
|
4
4
|
module VkAdsAuthApi
|
|
5
5
|
module Requests
|
|
6
6
|
module Info
|
|
7
|
-
def info(code:, client_id:, client_secret:)
|
|
7
|
+
def info(code:, client_id:, client_secret:, return_raw_response: false)
|
|
8
8
|
form_post(
|
|
9
9
|
path: 'code_info',
|
|
10
10
|
body: {
|
|
@@ -14,7 +14,8 @@ module Authkeeper
|
|
|
14
14
|
},
|
|
15
15
|
headers: {
|
|
16
16
|
'Content-Type' => 'application/x-www-form-urlencoded'
|
|
17
|
-
}
|
|
17
|
+
},
|
|
18
|
+
return_raw_response: return_raw_response
|
|
18
19
|
)
|
|
19
20
|
end
|
|
20
21
|
end
|
data/lib/authkeeper/version.rb
CHANGED