authkeeper 0.1.24 → 0.1.26
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: a299b6ba8215f0f45740988570057aace8f727572f647868af2a7e33cd288021
|
|
4
|
+
data.tar.gz: 69a089fda3bc8a4aa1d8a7d252f745f23fd6a3438804b06095975fec4c5c8a83
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 36903b7238ae02388a8754192bf3b33cc019ec7c7cc1661299a4bac743710a4fa18562fc4ba27231ce09486d149173c383f7f89b895fdc9e640cc43754abc014
|
|
7
|
+
data.tar.gz: c627570972ad3a5110797aa585b64f9f65abb06c69208d751ecbe5481908e9b42aba08e92fb5975d0e4115f953bc0981afe340fb6a5d9eda21a78ddf37d32c9c
|
|
@@ -22,16 +22,18 @@ module Authkeeper
|
|
|
22
22
|
}
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
-
def no_params_post(path:, body: nil, headers: nil)
|
|
25
|
+
def no_params_post(path:, body: nil, headers: nil, return_raw_response: false)
|
|
26
26
|
if Rails.env.test? && connection.adapter != 'Faraday::Adapter::Test'
|
|
27
27
|
raise StandardError, 'please stub request in test env'
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
response = connection.post(path, body, headers)
|
|
31
|
+
return response if return_raw_response
|
|
32
|
+
|
|
31
33
|
response.body if response.success?
|
|
32
34
|
end
|
|
33
35
|
|
|
34
|
-
def post(path:, body: {}, params: {}, headers: {}) # rubocop: disable Metrics/AbcSize
|
|
36
|
+
def post(path:, body: {}, params: {}, headers: {}, return_raw_response: false) # rubocop: disable Metrics/AbcSize
|
|
35
37
|
if Rails.env.test? && connection.adapter != 'Faraday::Adapter::Test'
|
|
36
38
|
raise StandardError, 'please stub request in test env'
|
|
37
39
|
end
|
|
@@ -45,6 +47,8 @@ module Authkeeper
|
|
|
45
47
|
end
|
|
46
48
|
request.body = body.to_json
|
|
47
49
|
end
|
|
50
|
+
return response if return_raw_response
|
|
51
|
+
|
|
48
52
|
response.body if response.success?
|
|
49
53
|
end
|
|
50
54
|
|
|
@@ -6,7 +6,7 @@ module Authkeeper
|
|
|
6
6
|
module VkAdsAuthApi
|
|
7
7
|
module Requests
|
|
8
8
|
module AccessToken
|
|
9
|
-
def fetch_access_token(client_id:, code:)
|
|
9
|
+
def fetch_access_token(client_id:, code:, return_raw_response: false)
|
|
10
10
|
form_post(
|
|
11
11
|
path: 'token.json',
|
|
12
12
|
body: {
|
|
@@ -16,7 +16,8 @@ module Authkeeper
|
|
|
16
16
|
},
|
|
17
17
|
headers: {
|
|
18
18
|
'Content-Type' => 'application/x-www-form-urlencoded'
|
|
19
|
-
}
|
|
19
|
+
},
|
|
20
|
+
return_raw_response: return_raw_response
|
|
20
21
|
)
|
|
21
22
|
end
|
|
22
23
|
|
|
@@ -35,7 +36,7 @@ module Authkeeper
|
|
|
35
36
|
)
|
|
36
37
|
end
|
|
37
38
|
|
|
38
|
-
def remove_access_token(client_id:, client_secret:, username: nil, user_id: nil)
|
|
39
|
+
def remove_access_token(client_id:, client_secret:, username: nil, user_id: nil, return_raw_response: false)
|
|
39
40
|
form_post(
|
|
40
41
|
path: 'token/delete.json',
|
|
41
42
|
body: {
|
|
@@ -46,7 +47,8 @@ module Authkeeper
|
|
|
46
47
|
}.compact,
|
|
47
48
|
headers: {
|
|
48
49
|
'Content-Type' => 'application/x-www-form-urlencoded'
|
|
49
|
-
}
|
|
50
|
+
},
|
|
51
|
+
return_raw_response: return_raw_response
|
|
50
52
|
)
|
|
51
53
|
end
|
|
52
54
|
end
|
data/lib/authkeeper/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: authkeeper
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.26
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bogdanov Anton
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-07-
|
|
11
|
+
date: 2026-07-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|