oauth_im 0.15.0 → 0.15.2
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 +4 -4
- data/app/services/oauth_im/client.rb +19 -5
- data/app/services/oauth_im/idp_client.rb +4 -4
- data/app/services/oauth_im/proxy_user.rb +4 -4
- data/app/services/oauth_im/registration_client.rb +2 -2
- data/app/services/oauth_im/request_client.rb +4 -4
- data/app/services/oauth_im/user_client.rb +2 -2
- data/lib/oauth_im/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4749aa8af3a4a6985c6d1d75993628037546650a37763713dc832a2c8e42336e
|
4
|
+
data.tar.gz: 9bb51b3e52a787b8983a2de1eb979e2e60175bef2627cfbfb9b395101de17133
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 053b4ff02c5542685dfabd6d58dfd2a0effc15f40a407b91674028b785f5238a88ff8530d2b8182d34bcce5847fa37a8a421643494a7de27873b8594dd4d3216
|
7
|
+
data.tar.gz: 6453b5f666529f3b8d4323e2899bf9bf03d7bb527accde2195479d84504b6c6adf08398920dad800ebbbce984be87060fb52e35724633a9aa4d0f21872d6a7bf
|
@@ -2,16 +2,30 @@
|
|
2
2
|
|
3
3
|
module OauthIm
|
4
4
|
class Client
|
5
|
-
|
5
|
+
# rubocop:disable Metrics/ParameterLists, Metrics/MethodLength
|
6
|
+
def self.for(request: nil,
|
7
|
+
user_jwt: nil,
|
8
|
+
secure_id: nil,
|
9
|
+
client_id: nil,
|
10
|
+
api_key: nil,
|
11
|
+
idp_url: nil)
|
6
12
|
if request.present?
|
7
|
-
RequestClient.new request: request
|
13
|
+
RequestClient.new request: request,
|
14
|
+
client_id: client_id,
|
15
|
+
idp_url: idp_url
|
8
16
|
elsif user_jwt.present?
|
9
|
-
UserClient.new user_jwt: user_jwt
|
17
|
+
UserClient.new user_jwt: user_jwt,
|
18
|
+
api_key: api_key,
|
19
|
+
idp_url: idp_url
|
10
20
|
elsif secure_id.present?
|
11
|
-
RegistrationClient.new secure_id: secure_id
|
21
|
+
RegistrationClient.new secure_id: secure_id,
|
22
|
+
api_key: api_key,
|
23
|
+
idp_url: idp_url
|
12
24
|
else
|
13
|
-
|
25
|
+
AdminClient.new api_key: api_key,
|
26
|
+
idp_url: idp_url
|
14
27
|
end
|
15
28
|
end
|
29
|
+
# rubocop:enable Metrics/ParameterLists, Metrics/MethodLength
|
16
30
|
end
|
17
31
|
end
|
@@ -14,10 +14,10 @@ module OauthIm
|
|
14
14
|
@default_idp_url ||= OauthIm.configuration.idp_url
|
15
15
|
end
|
16
16
|
|
17
|
-
def initialize(api_key:
|
18
|
-
idp_url:
|
19
|
-
@api_key = api_key
|
20
|
-
@idp_url = idp_url
|
17
|
+
def initialize(api_key: nil,
|
18
|
+
idp_url: nil)
|
19
|
+
@api_key = api_key || self.class.default_api_key
|
20
|
+
@idp_url = idp_url || self.class.default_idp_url
|
21
21
|
end
|
22
22
|
|
23
23
|
private
|
@@ -17,10 +17,10 @@ module OauthIm
|
|
17
17
|
|
18
18
|
attr_reader :attrs
|
19
19
|
|
20
|
-
def initialize(
|
21
|
-
@attrs = (
|
22
|
-
super api_key: attrs
|
23
|
-
idp_url: attrs
|
20
|
+
def initialize(opts)
|
21
|
+
@attrs = (opts || {}).to_h.with_indifferent_access
|
22
|
+
super api_key: @attrs[:api_key],
|
23
|
+
idp_url: @attrs[:idp_url]
|
24
24
|
end
|
25
25
|
|
26
26
|
def grant_sponsorship
|
@@ -13,11 +13,11 @@ module OauthIm
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def initialize(request:,
|
16
|
-
|
17
|
-
|
16
|
+
client_id: nil,
|
17
|
+
idp_url: nil)
|
18
18
|
@request = request
|
19
|
-
@idp_url = idp_url
|
20
|
-
@client_id = client_id
|
19
|
+
@idp_url = idp_url || self.class.default_idp_url
|
20
|
+
@client_id = client_id || self.class.default_client_id
|
21
21
|
end
|
22
22
|
|
23
23
|
def login_url
|
@@ -9,8 +9,8 @@ module OauthIm
|
|
9
9
|
attr_reader :user_jwt
|
10
10
|
|
11
11
|
def initialize(user_jwt:,
|
12
|
-
api_key:
|
13
|
-
idp_url:
|
12
|
+
api_key: nil,
|
13
|
+
idp_url: nil)
|
14
14
|
@user_jwt = user_jwt&.with_indifferent_access
|
15
15
|
super api_key: api_key, idp_url: idp_url
|
16
16
|
end
|
data/lib/oauth_im/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oauth_im
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Connally
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fusionauth_client
|