oauth_im 0.15.0 → 0.15.1
Sign up to get free protection for your applications and to get access to all the features.
- 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 +2 -2
- 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: 43d9ae7d853f98f0cafe43420959218c2a85cf7b87a76c719db8ec6dba3fc274
|
4
|
+
data.tar.gz: e997dc7ee11af0976eb451c8b025286b2b988e7d4a749fd4668b5e481a00a2ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb676b5995e44372dec671b97bf903a7c68b4e082eb76763161b6f6cdea533daca7502689701f5255b23f835325ef40a6f14e21fa8bd99976cb7c95a1edba69c
|
7
|
+
data.tar.gz: 517966a4743b43427647e09c58039b8dfd53bdbaebd992cdc06181146b242f28083067c08979b11509b59b8e1bc5d09234edd3b97a6372f405570596914ece85
|
@@ -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
|
@@ -19,8 +19,8 @@ module OauthIm
|
|
19
19
|
|
20
20
|
def initialize(attrs)
|
21
21
|
@attrs = (attrs || {}).with_indifferent_access
|
22
|
-
super api_key: attrs
|
23
|
-
idp_url: attrs
|
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.1
|
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-04-
|
11
|
+
date: 2024-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fusionauth_client
|