sp-seutils 0.0.2 → 0.0.3
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/lib/sp-seutils.rb +46 -25
- 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: e18832ba562cb24e3648d453c28eebfa558c9fdf7341aa9f489cf5d173358236
|
|
4
|
+
data.tar.gz: 1764bcbccf95fbee492285b644d2451491d05a277382ceeccdf4970644467562
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 59f84d80d3bc418b137874ffc5013ca923e575c6cec990f0a6d1245f846a1f30d2fbf3fe153e0ef8e6b4605f2e74889c625d53621edc5d93d6a0f415be546125
|
|
7
|
+
data.tar.gz: a51e75afda9ee24481656434a302ed98d5bba1d1e8413f30d11be3002001801fc9251ff9dc8c1ca110880c40cf1a4fae1327d19ff3a8e7cbcb7c9d12d7048cb9
|
data/lib/sp-seutils.rb
CHANGED
|
@@ -489,31 +489,52 @@ class SeUtils
|
|
|
489
489
|
#-----------------------------------------------------------------------------#
|
|
490
490
|
# Get accounts from a source
|
|
491
491
|
#
|
|
492
|
-
def self.api_source_getaccounts(org,
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
492
|
+
def self.api_source_getaccounts(org,client_id,client_secret,source_id,token=nil)
|
|
493
|
+
api = "api/source/getAccounts"
|
|
494
|
+
|
|
495
|
+
args = "?id=#{source_id}"
|
|
496
|
+
url = cc_url(URI.join(org, api+args).to_s)
|
|
497
|
+
# puts "executing API GET #{url}"
|
|
498
|
+
token = token || idn_oauth_2(org,client_id,client_secret)
|
|
499
|
+
|
|
500
|
+
rest_result = nil
|
|
501
|
+
redirected_url = nil
|
|
502
|
+
response = RestClient::Request.new({
|
|
503
|
+
method: :get,
|
|
504
|
+
url: url,
|
|
505
|
+
timeout: nil,
|
|
506
|
+
headers: {'Authorization' => "Bearer #{token}",
|
|
507
|
+
"Accept"=>"*/*" ,
|
|
508
|
+
'cache-control' => 'no-cache'
|
|
509
|
+
}
|
|
510
|
+
}).execute do |response, request, result, &block|
|
|
511
|
+
rest_result = handle_rest_response(response, request, result, &block)
|
|
512
|
+
end
|
|
513
|
+
return rest_result
|
|
514
|
+
end
|
|
515
|
+
# api = "api/source/getAccounts"
|
|
516
|
+
|
|
517
|
+
# body = JSON.generate({:id=>source_id})
|
|
518
|
+
# url = cc_url(URI.join(org, api).to_s)
|
|
519
|
+
# token = token || idn_oauth(org,user,password,client_id,client_secret)
|
|
520
|
+
|
|
521
|
+
# rest_result = nil
|
|
522
|
+
# redirected_url = nil
|
|
523
|
+
# response = RestClient::Request.new({
|
|
524
|
+
# method: :get,
|
|
525
|
+
# url: url,
|
|
526
|
+
# payload: body,
|
|
527
|
+
# timeout: nil,
|
|
528
|
+
# headers: {'Authorization' => "Bearer #{token}",
|
|
529
|
+
# "Accept"=>"*/*" ,
|
|
530
|
+
# 'Content-Type' => 'application/json',
|
|
531
|
+
# 'cache-control' => 'no-cache'
|
|
532
|
+
# }
|
|
533
|
+
# }).execute do |response, request, result, &block|
|
|
534
|
+
# rest_result = handle_rest_response(response, request, result, &block)
|
|
535
|
+
# end
|
|
536
|
+
# return rest_result
|
|
537
|
+
# end
|
|
517
538
|
|
|
518
539
|
#-----------------------------------------------------------------------------#
|
|
519
540
|
# Get accounts CSV file
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sp-seutils
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Josh Karnes
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-12-
|
|
11
|
+
date: 2020-12-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Utilities SailPoint SEs can use to help perform demo system tasks.
|
|
14
14
|
email: josh.karnes@sailpoint.com
|