@simpleview/sv-auth-client 6.13.1 → 6.22.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.
package/.yarn/.gitkeep ADDED
File without changes
package/.yarnrc.yml ADDED
@@ -0,0 +1,4 @@
1
+ nodeLinker: node-modules
2
+
3
+ enableGlobalCache: false
4
+ cacheFolder: .yarn/cache
package/Dockerfile CHANGED
@@ -5,14 +5,17 @@ ENV NODE_EXTRA_CA_CERTS=/usr/local/share/ca-certificates/netskope.crt
5
5
  COPY netskope.crt /usr/local/share/ca-certificates/
6
6
  RUN update-ca-certificates
7
7
 
8
+ RUN corepack enable && corepack prepare yarn@4.0.1 --activate
9
+
10
+ COPY .yarnrc.yml /app/.yarnrc.yml
11
+ COPY .yarn /app/.yarn
8
12
  COPY package.json /app/package.json
9
- COPY package-lock.json /app/package-lock.json
13
+ COPY yarn.lock /app/yarn.lock
10
14
 
11
- RUN cd /app && npm install
15
+ WORKDIR /app
16
+ RUN yarn install
12
17
 
13
18
  COPY src /app/src
14
19
  COPY .eslintrc.json /app/.eslintrc.json
15
20
 
16
- WORKDIR /app
17
-
18
21
  CMD ["sleep", "infinity"]
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@simpleview/sv-auth-client",
3
- "version": "6.13.1",
3
+ "version": "6.22.0",
4
4
  "description": "Client for communicating with sv-auth",
5
5
  "author": "Owen Allen <owenallenaz@gmail.com>",
6
6
  "dependencies": {
7
7
  "@graphql-tools/utils": "9.2.1",
8
- "@simpleview/sv-graphql-client": ">=4.1.3",
9
8
  "@simpleview/express-async-handler": "1.0.2",
9
+ "@simpleview/sv-graphql-client": ">=4.1.3",
10
10
  "axios": "1.3.4",
11
11
  "expiry-map": "2.0.0",
12
12
  "graphql-tag": "2.12.6",
@@ -21,8 +21,8 @@
21
21
  "@babel/core": "7.21.3",
22
22
  "@babel/eslint-parser": "7.21.3",
23
23
  "@graphql-tools/schema": "9.0.17",
24
- "@simpleview/mochalib": "2.0.2",
25
24
  "@simpleview/assertlib": "1.2.0",
25
+ "@simpleview/mochalib": "2.0.2",
26
26
  "cookie": "0.5.0",
27
27
  "cookie-session": "2.0.0",
28
28
  "eslint": "8.36.0",
package/readme.md CHANGED
@@ -410,9 +410,7 @@ This is a helper method which registers the `callback` and `logout` functions on
410
410
 
411
411
  ## Development
412
412
 
413
- * Enter dev environment - `sudo npm run docker`
414
- * Test - `npm test`
415
- * Publish - `sudo npm run publish SEMVER`
413
+ * Publish - `sv script sv-auth publish SEMVER`
416
414
 
417
415
  ## Related Documentation
418
416
 
@@ -32,6 +32,7 @@ class Oauth2Express {
32
32
  "https://auth.simpleviewinc.com/",
33
33
  "https://auth.dev.simpleviewinc.com/",
34
34
  "https://auth.qa.simpleviewinc.com/",
35
+ "https://auth.staging.simpleviewinc.com/",
35
36
  "https://auth.kube.simpleview.io/"
36
37
  ]
37
38
 
@@ -91,30 +91,6 @@ class AuthPrefix {
91
91
  return returnData;
92
92
  }
93
93
 
94
- async accounts_sync({ fields, context }) {
95
- context = context || this._graphServer.context;
96
-
97
- const result = await query({
98
- query : `
99
- mutation {
100
- auth {
101
- accounts_sync {
102
- ${fields}
103
- }
104
- }
105
- }
106
- `,
107
- url : this._graphUrl,
108
- token : context.token
109
- });
110
-
111
- const returnData = result.auth.accounts_sync;
112
-
113
- nullToUndefined(returnData);
114
-
115
- return returnData;
116
- }
117
-
118
94
  async accounts_camber_sync({ fields, context }) {
119
95
  context = context || this._graphServer.context;
120
96
 
@@ -166,24 +142,6 @@ class AuthPrefix {
166
142
  return returnData;
167
143
  }
168
144
 
169
- async accounts_email_setup({ fields, context = this._graphServer.context }) {
170
- return query({
171
- query : `
172
- mutation {
173
- auth {
174
- accounts_email_setup {
175
- ${fields}
176
- }
177
- }
178
- }
179
- `,
180
- url : this._graphUrl,
181
- token : context.token,
182
- key : "auth.accounts_email_setup",
183
- clean : true
184
- });
185
- }
186
-
187
145
  async oauth_clients(...args) {
188
146
  return this._oauthClients.find(...args);
189
147
  }
@@ -243,6 +201,33 @@ class AuthPrefix {
243
201
  return returnData;
244
202
  }
245
203
 
204
+ async current_instances({ input, fields, context }) {
205
+ context = context || this._graphServer.context;
206
+
207
+ const result = await query({
208
+ query : `
209
+ query($input: auth_current_instances_input!) {
210
+ auth {
211
+ current_instances(input: $input) {
212
+ ${fields}
213
+ }
214
+ }
215
+ }
216
+ `,
217
+ variables : {
218
+ input
219
+ },
220
+ url : this._graphUrl,
221
+ token : context.token
222
+ });
223
+
224
+ const returnData = result.auth.current_instances;
225
+
226
+ nullToUndefined(returnData)
227
+
228
+ return returnData;
229
+ }
230
+
246
231
  async reset_password_start({ input, fields }) {
247
232
  const result = await query({
248
233
  query : `
@@ -410,6 +395,26 @@ class AuthPrefix {
410
395
  return result.auth.login_sso_token;
411
396
  }
412
397
 
398
+ async login_internal_sso_token({ input, fields }) {
399
+ const result = await query({
400
+ query : `
401
+ query($input: auth_login_internal_sso_token_input!) {
402
+ auth {
403
+ login_internal_sso_token(input: $input) {
404
+ ${fields}
405
+ }
406
+ }
407
+ }
408
+ `,
409
+ variables : {
410
+ input
411
+ },
412
+ url : this._graphUrl
413
+ });
414
+
415
+ return result.auth.login_internal_sso_token;
416
+ }
417
+
413
418
  async check_token_cache({ date, acct_id, fields, context }) {
414
419
  context = context || this._graphServer.context;
415
420
 
@@ -710,6 +715,33 @@ class AuthPrefix {
710
715
  return returnData;
711
716
  }
712
717
 
718
+ async instance_login_url({ input, fields, context }) {
719
+ context = context || this._graphServer.context;
720
+
721
+ const result = await query({
722
+ query: `
723
+ query($input: auth_instance_login_url_input!) {
724
+ auth {
725
+ instance_login_url(input: $input) {
726
+ ${fields}
727
+ }
728
+ }
729
+ }
730
+ `,
731
+ variables: {
732
+ input
733
+ },
734
+ url: this._graphUrl,
735
+ token: context.token
736
+ });
737
+
738
+ const returnData = result.auth.instance_login_url;
739
+
740
+ nullToUndefined(returnData);
741
+
742
+ return returnData;
743
+ }
744
+
713
745
  async send_email_code({ fields, context }) {
714
746
  context = context || this._graphServer.context;
715
747
 
@@ -804,6 +836,28 @@ class AuthPrefix {
804
836
  return returnData;
805
837
  }
806
838
 
839
+ async test_side_effects({ context }) {
840
+ context = context || this._graphServer.context;
841
+
842
+ const result = await query({
843
+ query : `
844
+ mutation {
845
+ auth {
846
+ test_side_effects
847
+ }
848
+ }
849
+ `,
850
+ url : this._graphUrl,
851
+ token : context.token
852
+ });
853
+
854
+ const returnData = result.auth.test_side_effects;
855
+
856
+ nullToUndefined(returnData);
857
+
858
+ return returnData;
859
+ }
860
+
807
861
  async uninstrument({ fields, context }) {
808
862
  context = context || this._graphServer.context;
809
863