aux_helper 0.0.23 → 0.0.24

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
  SHA1:
3
- metadata.gz: f7bf9a743be8e0fb1da86cc5ea9d719eaa8dcd8a
4
- data.tar.gz: 11b46b404c169583e76526917d072644613cc158
3
+ metadata.gz: eb4a94cae47bb164eb5562d6d67670fb8f4a678f
4
+ data.tar.gz: f8b9bdb5a3fe8f2a99d26fe9aaf694079c6f289b
5
5
  SHA512:
6
- metadata.gz: e109fe8f7ceb4a096269e7d33b36722a89c73b9cbd0c3eed3a9a43e826fad9e63657791cab87b2ae496b1bb987056ae34ab70653c053beea9813d77ba0db6c01
7
- data.tar.gz: 922c305181a505ab0f0d87a348e68fd894d93166bf395a1613139209e64dd7e4e4fe83687a676dcbda22a8a889afada19b405c3b35b182db6cce6a3c0a7341c2
6
+ metadata.gz: 0b9957aba787b44789c441b22335a131eca4738db3d6614b2ca385fc5bcc8642450006a6faa1d676ee6c63c877b7ba38c0c125917aebc546d59199c227edbc78
7
+ data.tar.gz: 9b971745c7be5405724521bd9463d7ce698b7a4a011a1cb08c9f0debd63271f9ea2b31ced4cb184b756bb5e58ac0fab970ab9fc6419711b85aa933bd7a5a6ce7
@@ -135,7 +135,7 @@ module AUXHelper
135
135
  def auth_user(auth)
136
136
  return if are_invalid auth
137
137
  # note - differences from 'post': (1) no .to_json (2) return response hash
138
- response_json = RestClient.post "#{@api_server.to_s}/v0/users/authenticate", auth, compute_headers(true)
138
+ response_json = RestClient.post "#{@api_server.to_s}/v0/users/authenticate", auth, compute_headers(false)
139
139
  response = JSON.parse(response_json)
140
140
  response['response']
141
141
  rescue => e
@@ -148,10 +148,23 @@ module AUXHelper
148
148
  end
149
149
 
150
150
  def get_whitelisted_users(account_id)
151
+ return if are_invalid account_id
151
152
  # damn... it's broken: return if are_invalid_mongo_key account_id
152
153
  get "#{@api_server.to_s}/v0/users/whitelist/#{account_id}"
153
154
  end
154
155
 
156
+ # Find orgs associated with a domain
157
+ def get_orgs_by_auth_domain(auth_domain)
158
+ return if are_invalid auth_domain
159
+ get "#{@api_server.to_s}/v0/taps?auth_domain=#{auth_domain}"
160
+ end
161
+
162
+ # Find orgs associated with an IdP
163
+ def get_orgs_by_saml_issuer(issuer)
164
+ return if are_invalid issuer
165
+ get "#{@api_server.to_s}/v0/taps?saml_issuer=#{issuer}"
166
+ end
167
+
155
168
  # add email address to signup list
156
169
  # returns true if successful
157
170
  def signup_email(email_address)
@@ -1,3 +1,3 @@
1
1
  module AUXHelper
2
- VERSION = "0.0.23"
2
+ VERSION = "0.0.24"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aux_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.23
4
+ version: 0.0.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - thor-aux
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-16 00:00:00.000000000 Z
11
+ date: 2018-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client