kinde_sdk 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -2
- data/lib/kinde_sdk/version.rb +1 -1
- data/lib/kinde_sdk.rb +9 -1
- data/spec/kinde_sdk_spec.rb +1 -1
- metadata +2 -3
- data/Gemfile.lock +0 -119
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff03b45588d7636dddb42047a5376ca7e987b0af67a34d9875aa4d2f21174082
|
4
|
+
data.tar.gz: 4e94bf93e1ff2cf76ff5ec561e7258a49f2bdcd6761c854ace4c8a2e7dc58121
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2f46b4988a9206f9ec6814e0fb16b393048097f39dd063901924bdbbceed1881f7f3a8776aa62cd31cdee13922ca437c8c63161119e1e3c07a7328b65f62413
|
7
|
+
data.tar.gz: f54cfbb9548d5d4a73d93126e970194e4c7fbc1cc25ddb5041cb1c4967a101a361a190217840b830bc1fe22eeffa07dbcaf60be871a486295c1ceddc4f9eafeb
|
data/README.md
CHANGED
@@ -83,8 +83,9 @@ defined in allowed logout urls of your kinde organization's application config
|
|
83
83
|
- `Authorize url` and `Token url` are paths to oauth2 methods in kinde. You don't need to change it.
|
84
84
|
- `Debugging` set to true start writing verbose request logs. Might be useful while developing your application.
|
85
85
|
- `Business name` is a parameter which is used in requests building. By default it is extracted from your
|
86
|
-
`domain` endpoint. For example, if your domain is `your-biz.kinde.com`, then business name will be set
|
87
|
-
|
86
|
+
`domain` endpoint. For example, if your domain is `https://your-biz.kinde.com`, then business name will be set
|
87
|
+
to `your-biz`, for `https://example-chamois.au.kinde.com` it'll be `example-chamois.au` and so on.
|
88
|
+
You don't need to change it in general, but it is possible to override if needed.
|
88
89
|
- `Logger` might be set to any kind of loggers you are using. By default it is set to `Rails.logger` if gem is used in
|
89
90
|
rails application or `Logger.new(STDOUT)` if it is not a rails app.
|
90
91
|
|
data/lib/kinde_sdk/version.rb
CHANGED
data/lib/kinde_sdk.rb
CHANGED
@@ -97,7 +97,7 @@ module KindeSdk
|
|
97
97
|
config = KindeApi::Configuration.default
|
98
98
|
config.configure do |c|
|
99
99
|
c.access_token = bearer_token
|
100
|
-
c.server_variables = { businessName:
|
100
|
+
c.server_variables = { businessName: business_name }
|
101
101
|
c.host = @config.domain
|
102
102
|
c.debugging = @config.debugging
|
103
103
|
c.logger = @config.logger
|
@@ -105,5 +105,13 @@ module KindeSdk
|
|
105
105
|
|
106
106
|
KindeApi::ApiClient.new(config)
|
107
107
|
end
|
108
|
+
|
109
|
+
private
|
110
|
+
|
111
|
+
def business_name
|
112
|
+
# from https://example.kinde.com fetches `example`
|
113
|
+
# from https://example-chamois.au.kinde.com fetches `example-chamois.au`
|
114
|
+
@config.business_name || @config.domain.split("//")[1].split(".")[0..-3].join(".")
|
115
|
+
end
|
108
116
|
end
|
109
117
|
end
|
data/spec/kinde_sdk_spec.rb
CHANGED
@@ -63,7 +63,7 @@ describe KindeSdk do
|
|
63
63
|
"exp" => 1679600554,
|
64
64
|
"feature_flags" => nil,
|
65
65
|
"iat" => 1679514154,
|
66
|
-
"iss" => "https://
|
66
|
+
"iss" => "https://example.kinde.com",
|
67
67
|
"jti" => "22c48b2c-da46-4661-a7ff-425c23eceab5",
|
68
68
|
"org_code" => "org_cb4544175bc",
|
69
69
|
"permissions" => ["read:todos", "create:todos"],
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kinde_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kinde Australia Pty Ltd
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -100,7 +100,6 @@ extensions: []
|
|
100
100
|
extra_rdoc_files: []
|
101
101
|
files:
|
102
102
|
- Gemfile
|
103
|
-
- Gemfile.lock
|
104
103
|
- LICENSE
|
105
104
|
- README.md
|
106
105
|
- Rakefile
|
data/Gemfile.lock
DELETED
@@ -1,119 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
kinde_sdk (1.0.0)
|
5
|
-
faraday-follow_redirects
|
6
|
-
oauth2 (~> 2.0)
|
7
|
-
pkce_challenge
|
8
|
-
typhoeus (~> 1.0, >= 1.0.1)
|
9
|
-
|
10
|
-
GEM
|
11
|
-
remote: https://rubygems.org/
|
12
|
-
specs:
|
13
|
-
addressable (2.8.3)
|
14
|
-
public_suffix (>= 2.0.2, < 6.0)
|
15
|
-
ast (2.4.2)
|
16
|
-
byebug (11.1.3)
|
17
|
-
coderay (1.1.3)
|
18
|
-
crack (0.4.5)
|
19
|
-
rexml
|
20
|
-
diff-lcs (1.5.0)
|
21
|
-
ethon (0.16.0)
|
22
|
-
ffi (>= 1.15.0)
|
23
|
-
faraday (2.7.4)
|
24
|
-
faraday-net_http (>= 2.0, < 3.1)
|
25
|
-
ruby2_keywords (>= 0.0.4)
|
26
|
-
faraday-follow_redirects (0.3.0)
|
27
|
-
faraday (>= 1, < 3)
|
28
|
-
faraday-net_http (3.0.2)
|
29
|
-
ffi (1.15.5)
|
30
|
-
hashdiff (1.0.1)
|
31
|
-
hashie (5.0.0)
|
32
|
-
json (2.6.3)
|
33
|
-
jwt (2.7.0)
|
34
|
-
method_source (1.0.0)
|
35
|
-
multi_xml (0.6.0)
|
36
|
-
oauth2 (2.0.9)
|
37
|
-
faraday (>= 0.17.3, < 3.0)
|
38
|
-
jwt (>= 1.0, < 3.0)
|
39
|
-
multi_xml (~> 0.5)
|
40
|
-
rack (>= 1.2, < 4)
|
41
|
-
snaky_hash (~> 2.0)
|
42
|
-
version_gem (~> 1.1)
|
43
|
-
parallel (1.22.1)
|
44
|
-
parser (3.2.2.0)
|
45
|
-
ast (~> 2.4.1)
|
46
|
-
pkce_challenge (1.0.0)
|
47
|
-
pry (0.14.2)
|
48
|
-
coderay (~> 1.1)
|
49
|
-
method_source (~> 1.0)
|
50
|
-
pry-byebug (3.10.1)
|
51
|
-
byebug (~> 11.0)
|
52
|
-
pry (>= 0.13, < 0.15)
|
53
|
-
public_suffix (5.0.1)
|
54
|
-
rack (3.0.7)
|
55
|
-
rainbow (3.1.1)
|
56
|
-
rake (13.0.6)
|
57
|
-
regexp_parser (2.7.0)
|
58
|
-
rexml (3.2.5)
|
59
|
-
rspec (3.12.0)
|
60
|
-
rspec-core (~> 3.12.0)
|
61
|
-
rspec-expectations (~> 3.12.0)
|
62
|
-
rspec-mocks (~> 3.12.0)
|
63
|
-
rspec-core (3.12.1)
|
64
|
-
rspec-support (~> 3.12.0)
|
65
|
-
rspec-expectations (3.12.2)
|
66
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
67
|
-
rspec-support (~> 3.12.0)
|
68
|
-
rspec-mocks (3.12.5)
|
69
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
70
|
-
rspec-support (~> 3.12.0)
|
71
|
-
rspec-support (3.12.0)
|
72
|
-
rubocop (1.49.0)
|
73
|
-
json (~> 2.3)
|
74
|
-
parallel (~> 1.10)
|
75
|
-
parser (>= 3.2.0.0)
|
76
|
-
rainbow (>= 2.2.2, < 4.0)
|
77
|
-
regexp_parser (>= 1.8, < 3.0)
|
78
|
-
rexml (>= 3.2.5, < 4.0)
|
79
|
-
rubocop-ast (>= 1.28.0, < 2.0)
|
80
|
-
ruby-progressbar (~> 1.7)
|
81
|
-
unicode-display_width (>= 2.4.0, < 3.0)
|
82
|
-
rubocop-ast (1.28.0)
|
83
|
-
parser (>= 3.2.1.0)
|
84
|
-
rubocop-capybara (2.17.1)
|
85
|
-
rubocop (~> 1.41)
|
86
|
-
rubocop-rake (0.6.0)
|
87
|
-
rubocop (~> 1.0)
|
88
|
-
rubocop-rspec (2.19.0)
|
89
|
-
rubocop (~> 1.33)
|
90
|
-
rubocop-capybara (~> 2.17)
|
91
|
-
ruby-progressbar (1.13.0)
|
92
|
-
ruby2_keywords (0.0.5)
|
93
|
-
snaky_hash (2.0.1)
|
94
|
-
hashie
|
95
|
-
version_gem (~> 1.1, >= 1.1.1)
|
96
|
-
typhoeus (1.4.0)
|
97
|
-
ethon (>= 0.9.0)
|
98
|
-
unicode-display_width (2.4.2)
|
99
|
-
version_gem (1.1.2)
|
100
|
-
webmock (3.18.1)
|
101
|
-
addressable (>= 2.8.0)
|
102
|
-
crack (>= 0.3.2)
|
103
|
-
hashdiff (>= 0.4.0, < 2.0.0)
|
104
|
-
|
105
|
-
PLATFORMS
|
106
|
-
arm64-darwin-21
|
107
|
-
|
108
|
-
DEPENDENCIES
|
109
|
-
kinde_sdk!
|
110
|
-
pry-byebug
|
111
|
-
rake (~> 13.0.1)
|
112
|
-
rspec (~> 3.6, >= 3.6.0)
|
113
|
-
rubocop
|
114
|
-
rubocop-rake
|
115
|
-
rubocop-rspec
|
116
|
-
webmock
|
117
|
-
|
118
|
-
BUNDLED WITH
|
119
|
-
2.3.16
|