oauth_im 0.10.3 → 0.12.0
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/admin_client.rb +8 -2
- data/app/services/oauth_im/proxy_user.rb +13 -0
- 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: decb65e3a5b2753a1a2ecc5dd73f7e149724278cf1a7ec8ac8083668ab99da2f
|
4
|
+
data.tar.gz: d5e22d069de29e8a9b4b5f3deaae75dcf89b4602b098380d65678cce6938b553
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 859e9ea75b6ba0505cee390e3edb0c7119aef4225447470a31d0e330017d15ca69c4b4f179a7cd6582f61b77b41396b6ef8d3028c7eefca648f0448cb6f8aa36
|
7
|
+
data.tar.gz: 69ef30f3cb1800dffdae068043db0b1328e860994d23a8759fefe64123bb7bac07a70e22e78bd7171774db2cf302633a9f33151c1c1001bc7ddf97c81c9effa0
|
@@ -4,11 +4,17 @@ require 'fusionauth/fusionauth_client'
|
|
4
4
|
|
5
5
|
module OauthIm
|
6
6
|
class AdminClient < IdpClient
|
7
|
-
def search_for(term: '', email: '')
|
7
|
+
def search_for(term: '', email: '', limit: 25, offset: 0)
|
8
8
|
if email.present?
|
9
9
|
proxy_users_for client.retrieve_user_by_email(email)
|
10
10
|
elsif term.present?
|
11
|
-
proxy_users_for client.search_users_by_query(
|
11
|
+
proxy_users_for client.search_users_by_query(
|
12
|
+
search: {
|
13
|
+
numberOfResults: limit,
|
14
|
+
queryString: term,
|
15
|
+
startRow: offset
|
16
|
+
}
|
17
|
+
)
|
12
18
|
else
|
13
19
|
[]
|
14
20
|
end
|
@@ -43,6 +43,10 @@ module OauthIm
|
|
43
43
|
reset_attrs
|
44
44
|
end
|
45
45
|
|
46
|
+
def set_password(password, change_required: true)
|
47
|
+
update_user(password: password, passwordChangeRequired: change_required)
|
48
|
+
end
|
49
|
+
|
46
50
|
def deactivate
|
47
51
|
client.deactivate_user user_id
|
48
52
|
reset_attrs
|
@@ -63,12 +67,21 @@ module OauthIm
|
|
63
67
|
reset_attrs
|
64
68
|
end
|
65
69
|
|
70
|
+
def update_user(data)
|
71
|
+
client.patch_user user_id, params_for_user(data)
|
72
|
+
reset_attrs
|
73
|
+
end
|
74
|
+
|
66
75
|
def params_for(data)
|
67
76
|
{ registration:
|
68
77
|
{ applicationId: application_id,
|
69
78
|
data: data } }
|
70
79
|
end
|
71
80
|
|
81
|
+
def params_for_user(data)
|
82
|
+
{ applicationId: application_id, user: data }
|
83
|
+
end
|
84
|
+
|
72
85
|
def reset_attrs
|
73
86
|
@attrs = AdminClient.new.proxy_attrs_for(user_id: user_id)
|
74
87
|
self
|
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.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Connally
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-09-
|
11
|
+
date: 2022-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fusionauth_client
|