oauth_im 0.11.0 → 0.12.1
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d76c8274bed6bd0f1186d0f91c3f19d1f4c9c3f33fb76f42aabef39aa8e69abc
|
4
|
+
data.tar.gz: 7aa343de7cd28ba873083f234c8af2129673bf1f362fcbedc48749ed637f8e26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16ef3dc4382aef3277073f88ad5acacbff0cb036c7dcf971d207b03bc29ef2e3e455a73c90e954426c1b81e5117c6cbeb30af28f7ca12db84045e3271282ae23
|
7
|
+
data.tar.gz: 5e270df61e8e55069d2c788347e26492c359ed0fcbc3dcc38707e5bd60098e6e2ce8ef95e184e5d5167828a601f46bbaa03917b461068c7130c6f261bfa97f43
|
@@ -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
|
@@ -25,8 +25,14 @@ module OauthIm
|
|
25
25
|
jwt_token[:roles].include? 'admin'
|
26
26
|
end
|
27
27
|
|
28
|
+
alias current_user_id application_id
|
29
|
+
|
28
30
|
private
|
29
31
|
|
32
|
+
def application_id
|
33
|
+
@application_id ||= jwt_token[:applicationId]
|
34
|
+
end
|
35
|
+
|
30
36
|
def attrs
|
31
37
|
@attrs ||= success_response[:user] || {}
|
32
38
|
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.
|
4
|
+
version: 0.12.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: 2022-09-
|
11
|
+
date: 2022-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fusionauth_client
|