uid2 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/Gemfile.lock +1 -1
- data/lib/faraday/uid2/middleware.rb +4 -4
- data/lib/uid2/client.rb +3 -3
- data/lib/uid2/version.rb +1 -1
- metadata +2 -3
- data/.rubocop.yml +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8b2e6e0c56ef4b62d319695da3cab5a524323b3e010a39f73aa757aedbf4235
|
4
|
+
data.tar.gz: 4c92d5fe72b6f8f33590b8629528ee1d0f35669452ca39697f6163ae41c2e572
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38d52c4d78f143b49290c4e7c912987cdb282efe0486418fd8ae80000727b315468bbefdf72b13dd68597ff04c4e231aba6f0fe976831699aa11398ace75dea1
|
7
|
+
data.tar.gz: 7bb0c89de55e98ef74da355d7d6a50ba0978e0032f3f5902c2ae03436a119d8886f9a9e0ab0c570795970c94f7a78f6e00a41eec43b050b8c39c85b2175a7f7c
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.2.1] - 2022-07-12
|
4
|
+
|
5
|
+
- Fix middleware options compatibility and refactor
|
6
|
+
|
7
|
+
## [0.2.0] - 2022-07-11
|
8
|
+
|
9
|
+
- Migrate to UID2 V2 API
|
10
|
+
- Add support for V2 API encryption
|
11
|
+
- Add support for API phone number params
|
12
|
+
|
3
13
|
## [0.1.0] - 2021-05-07
|
4
14
|
|
5
15
|
- Initial release
|
data/Gemfile.lock
CHANGED
@@ -7,11 +7,11 @@ require "hashie/mash"
|
|
7
7
|
module Faraday
|
8
8
|
module Uid2
|
9
9
|
class Middleware < Faraday::Middleware
|
10
|
-
def initialize(app,
|
11
|
-
super(app
|
10
|
+
def initialize(app, options = {})
|
11
|
+
super(app)
|
12
12
|
|
13
|
-
@key = Base64.decode64(secret_key)
|
14
|
-
@is_refresh = is_refresh
|
13
|
+
@key = Base64.decode64(options.fetch(:secret_key))
|
14
|
+
@is_refresh = options.fetch(:is_refresh, false)
|
15
15
|
end
|
16
16
|
|
17
17
|
def call(request_env)
|
data/lib/uid2/client.rb
CHANGED
@@ -30,7 +30,7 @@ module Uid2
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def refresh_token(refresh_token:, refresh_response_key:)
|
33
|
-
http(
|
33
|
+
http(refresh_response_key: refresh_response_key).post("token/refresh", refresh_token).body
|
34
34
|
end
|
35
35
|
|
36
36
|
def get_salt_buckets(since: Time.now)
|
@@ -54,13 +54,13 @@ module Uid2
|
|
54
54
|
}
|
55
55
|
end
|
56
56
|
|
57
|
-
def http(
|
57
|
+
def http(refresh_response_key: nil)
|
58
58
|
Faraday.new(
|
59
59
|
url: base_url,
|
60
60
|
headers: credentials
|
61
61
|
) do |f|
|
62
62
|
f.request :json unless refresh_response_key
|
63
|
-
f.request :uid2_encryption, refresh_response_key || secret_key, is_refresh
|
63
|
+
f.request :uid2_encryption, {secret_key: (refresh_response_key || secret_key), is_refresh: !refresh_response_key.nil?}
|
64
64
|
f.adapter :net_http_persistent
|
65
65
|
end
|
66
66
|
end
|
data/lib/uid2/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uid2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Lee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -76,7 +76,6 @@ files:
|
|
76
76
|
- ".github/workflows/main.yml"
|
77
77
|
- ".gitignore"
|
78
78
|
- ".rspec"
|
79
|
-
- ".rubocop.yml"
|
80
79
|
- CHANGELOG.md
|
81
80
|
- CODE_OF_CONDUCT.md
|
82
81
|
- Gemfile
|
data/.rubocop.yml
DELETED