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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sp-seutils.rb +46 -25
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b00d6d780a49c095b8dd0be022c840570fdd84f3884a5fa30f07ffd98574f0e3
4
- data.tar.gz: bbffb16003d9f93c8dde7ded798dab195757e46b5574e682fd16e6e5c1655590
3
+ metadata.gz: e18832ba562cb24e3648d453c28eebfa558c9fdf7341aa9f489cf5d173358236
4
+ data.tar.gz: 1764bcbccf95fbee492285b644d2451491d05a277382ceeccdf4970644467562
5
5
  SHA512:
6
- metadata.gz: 8a59afbfd523b0f95482eed68d944615497d5e3b0b1cb6cab0e3f3cd7f28d4a4290f12be1a3052a2a697a8a9b27ad275313b394bbb922bd0ad8ea380a76bebeb
7
- data.tar.gz: 5d318e31a53927d7fae7bf64270db79b1771e4ccb2612ef31ac75e5b0c4a69ed33ffa4472202085c2a1bcab6d95cf85fe907953913c7f4fbe7f5e27cf2e15b23
6
+ metadata.gz: 59f84d80d3bc418b137874ffc5013ca923e575c6cec990f0a6d1245f846a1f30d2fbf3fe153e0ef8e6b4605f2e74889c625d53621edc5d93d6a0f415be546125
7
+ data.tar.gz: a51e75afda9ee24481656434a302ed98d5bba1d1e8413f30d11be3002001801fc9251ff9dc8c1ca110880c40cf1a4fae1327d19ff3a8e7cbcb7c9d12d7048cb9
@@ -489,31 +489,52 @@ class SeUtils
489
489
  #-----------------------------------------------------------------------------#
490
490
  # Get accounts from a source
491
491
  #
492
- def self.api_source_getaccounts(org,user,password,client_id,client_secret,source_id,token=nil)
493
- api = "api/source/getAccounts"
494
-
495
- body = JSON.generate({:id=>source_id})
496
- url = cc_url(URI.join(org, api).to_s)
497
- token = token || idn_oauth(org,user,password,client_id,client_secret)
498
-
499
- rest_result = nil
500
- redirected_url = nil
501
- response = RestClient::Request.new({
502
- method: :get,
503
- url: url,
504
- payload: body,
505
- timeout: nil,
506
- headers: {'Authorization' => "Bearer #{token}",
507
- "Accept"=>"*/*" ,
508
- 'Cache-Control' => 'no-cache',
509
- 'Content-Type' => 'application/json',
510
- 'cache-control' => 'no-cache'
511
- }
512
- }).execute do |response, request, result, &block|
513
- rest_result = handle_rest_response(response, request, result, &block)
514
- end
515
- return rest_result
516
- end
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.2
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-10 00:00:00.000000000 Z
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