@sasjs/api 0.18.1 → 0.20.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/build/browser.js +820 -29
- package/build/cjs/admin/service.js +209 -0
- package/build/cjs/authconfig/service.js +139 -0
- package/build/cjs/corpus/admin.js +101 -0
- package/build/cjs/corpus/authconfig.js +47 -0
- package/build/cjs/corpus/directory.js +31 -0
- package/build/cjs/corpus/home.js +51 -0
- package/build/cjs/corpus/runner.js +16 -0
- package/build/cjs/directory/service.js +116 -0
- package/build/cjs/home/service.js +103 -0
- package/build/cjs/host/dispatch.js +67 -8
- package/build/cjs/identity/memory-store.js +4 -1
- package/build/cjs/index.js +25 -12
- package/build/cjs/routes/generated.js +56 -0
- package/build/cjs/routes/overlay.js +97 -15
- package/build/esm/admin/service.d.ts +123 -0
- package/build/esm/admin/service.d.ts.map +1 -0
- package/build/esm/admin/service.js +201 -0
- package/build/esm/authconfig/service.d.ts +92 -0
- package/build/esm/authconfig/service.d.ts.map +1 -0
- package/build/esm/authconfig/service.js +134 -0
- package/build/esm/corpus/admin.d.ts +22 -0
- package/build/esm/corpus/admin.d.ts.map +1 -0
- package/build/esm/corpus/admin.js +98 -0
- package/build/esm/corpus/authconfig.d.ts +31 -0
- package/build/esm/corpus/authconfig.d.ts.map +1 -0
- package/build/esm/corpus/authconfig.js +44 -0
- package/build/esm/corpus/directory.d.ts +20 -0
- package/build/esm/corpus/directory.d.ts.map +1 -0
- package/build/esm/corpus/directory.js +28 -0
- package/build/esm/corpus/home.d.ts +27 -0
- package/build/esm/corpus/home.d.ts.map +1 -0
- package/build/esm/corpus/home.js +48 -0
- package/build/esm/corpus/runner.d.ts.map +1 -1
- package/build/esm/corpus/runner.js +16 -0
- package/build/esm/directory/service.d.ts +71 -0
- package/build/esm/directory/service.d.ts.map +1 -0
- package/build/esm/directory/service.js +112 -0
- package/build/esm/home/service.d.ts +69 -0
- package/build/esm/home/service.d.ts.map +1 -0
- package/build/esm/home/service.js +98 -0
- package/build/esm/host/dispatch.d.ts +37 -0
- package/build/esm/host/dispatch.d.ts.map +1 -1
- package/build/esm/host/dispatch.js +65 -7
- package/build/esm/identity/memory-store.d.ts.map +1 -1
- package/build/esm/identity/memory-store.js +4 -1
- package/build/esm/identity/types.d.ts +5 -0
- package/build/esm/identity/types.d.ts.map +1 -1
- package/build/esm/index.d.ts +6 -0
- package/build/esm/index.d.ts.map +1 -1
- package/build/esm/index.js +5 -0
- package/build/esm/routes/generated.d.ts.map +1 -1
- package/build/esm/routes/generated.js +56 -0
- package/build/esm/routes/overlay.d.ts.map +1 -1
- package/build/esm/routes/overlay.js +97 -15
- package/package.json +1 -1
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The web interface's shell - the one page every host serves at `/`.
|
|
3
|
+
*
|
|
4
|
+
* The document states what the route is for: "Serves the web interface's
|
|
5
|
+
* `index.html`, with the current bundle version appended so a returning browser
|
|
6
|
+
* loads the updated bundle." That is the whole decision, and it is the same one
|
|
7
|
+
* on every host:
|
|
8
|
+
*
|
|
9
|
+
* - the SPA bundle has a fixed name (`index.bundle.js`), so a browser that
|
|
10
|
+
* keeps the previous build cached goes on rendering the previous interface
|
|
11
|
+
* after an update. A login screen once kept offering a password form the new
|
|
12
|
+
* server refused, and only a cache-disabled reload showed the new screen. The
|
|
13
|
+
* token is derived from the bundle's contents, so it changes with every build
|
|
14
|
+
* and is stable within one;
|
|
15
|
+
* - only an attribute naming the bundle is rewritten, so the same words in
|
|
16
|
+
* prose are left as prose;
|
|
17
|
+
* - a reference that already carries a query string is left alone, so applying
|
|
18
|
+
* this twice cannot produce a second `?v=`;
|
|
19
|
+
* - a host with no build answers a page saying so, rather than an error: a
|
|
20
|
+
* missing bundle costs a stale page at worst, and must never be the reason a
|
|
21
|
+
* deployment cannot render its own app.
|
|
22
|
+
*
|
|
23
|
+
* The host still reads the file and computes the digest - a hash of a megabyte
|
|
24
|
+
* bundle is the host's to make, and the package compiles with no node built-ins
|
|
25
|
+
* and no DOM `crypto`. What it cannot be left to each host is the rule that
|
|
26
|
+
* turns the two into the page, which is why it lives here.
|
|
27
|
+
*/
|
|
28
|
+
/** The entry bundle the served page references. */
|
|
29
|
+
export const BUNDLE_NAME = 'index.bundle.js';
|
|
30
|
+
/**
|
|
31
|
+
* What a host with no web build answers.
|
|
32
|
+
*
|
|
33
|
+
* A page rather than a `404`: the route is the interface, and an operator whose
|
|
34
|
+
* build did not land needs to see that from the browser rather than from a JSON
|
|
35
|
+
* error. The wording is sasjs/server's, so an adopting host changes nothing a
|
|
36
|
+
* user or a smoke test already reads.
|
|
37
|
+
*/
|
|
38
|
+
export const NO_WEB_BUILD = '<html><head></head><body>Web Build is not present</body></html>';
|
|
39
|
+
/** An attribute whose value names a file; quoted or not, both are valid. */
|
|
40
|
+
const FILE_ATTRIBUTE = /(\s(?:src|href)=)("[^"]*"|'[^']*'|[^\s>]+)/g;
|
|
41
|
+
/**
|
|
42
|
+
* A reference that names the bundle file itself.
|
|
43
|
+
*
|
|
44
|
+
* Anchored at the end (and at a path boundary) rather than `includes`, so an
|
|
45
|
+
* asset whose name merely begins with the bundle's - `index.bundle.js.css` - is
|
|
46
|
+
* left alone: it is a different file, and stamping it would suggest the token
|
|
47
|
+
* described something it did not.
|
|
48
|
+
*/
|
|
49
|
+
const BUNDLE_REFERENCE = new RegExp(`(^|/)${BUNDLE_NAME.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}$`);
|
|
50
|
+
/**
|
|
51
|
+
* The page with its bundle reference carrying that token.
|
|
52
|
+
*
|
|
53
|
+
* Only an attribute naming the bundle is rewritten. A reference that already
|
|
54
|
+
* carries a query string is left alone, so applying this twice is the same as
|
|
55
|
+
* applying it once.
|
|
56
|
+
*/
|
|
57
|
+
export const withBundleVersion = (html, version) => html.replace(FILE_ATTRIBUTE, (match, attribute, value) => {
|
|
58
|
+
const quote = value[0] === '"' || value[0] === "'" ? value[0] : '';
|
|
59
|
+
const target = quote ? value.slice(1, -1) : value;
|
|
60
|
+
if (!BUNDLE_REFERENCE.test(target) || target.includes('?'))
|
|
61
|
+
return match;
|
|
62
|
+
return `${attribute}${quote}${target}?v=${version}${quote}`;
|
|
63
|
+
});
|
|
64
|
+
const isNonEmptyString = (value) => typeof value === 'string' && value.length > 0;
|
|
65
|
+
/**
|
|
66
|
+
* The page, checked and stamped.
|
|
67
|
+
*
|
|
68
|
+
* A version is a query-string token: whitespace or a `?`/`#` would produce a URL
|
|
69
|
+
* that does not resolve, and a host that computed one from the wrong input would
|
|
70
|
+
* otherwise serve a broken reference rather than noticing.
|
|
71
|
+
*/
|
|
72
|
+
const pageOf = (page) => {
|
|
73
|
+
if (!page || typeof page !== 'object')
|
|
74
|
+
throw new Error('The web page is not an object.');
|
|
75
|
+
if (!isNonEmptyString(page.html))
|
|
76
|
+
throw new Error('The web page states no html, so there is nothing to serve. Answer `undefined` from the port when the host has no build.');
|
|
77
|
+
// a token, not text: the value is written into a quoted attribute, so a
|
|
78
|
+
// quote closes it early and serves a broken reference - the failure this
|
|
79
|
+
// check exists to stop. A digest is `[0-9a-f]`, so the set below is strict
|
|
80
|
+
// enough to be safe and wide enough for any host's chosen encoding
|
|
81
|
+
if (!isNonEmptyString(page.version) ||
|
|
82
|
+
!/^[A-Za-z0-9._-]+$/.test(page.version))
|
|
83
|
+
throw new Error(`The web page states version as ${JSON.stringify(page.version)}; it is the bundle's cache token, so it may contain only letters, digits, ".", "_" and "-" - anything else, a quote above all, would end the attribute it is written into.`);
|
|
84
|
+
return withBundleVersion(page.html, page.version);
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* The home service, over the host's own page.
|
|
88
|
+
*
|
|
89
|
+
* The port answers `undefined` when this host has no web build - a packaged
|
|
90
|
+
* server whose build folder is absent, a host that only answers the API - and
|
|
91
|
+
* the service answers the documented page rather than an error.
|
|
92
|
+
*/
|
|
93
|
+
export const createHomeService = (page) => ({
|
|
94
|
+
async home() {
|
|
95
|
+
const found = await page();
|
|
96
|
+
return found === undefined ? NO_WEB_BUILD : pageOf(found);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
@@ -6,7 +6,12 @@ import type { RuntimeService } from '../runtime/service.js';
|
|
|
6
6
|
import type { AppStreamRegistry } from '../drive/registry.js';
|
|
7
7
|
import type { CodeService } from '../code/service.js';
|
|
8
8
|
import type { InfoService } from '../info/service.js';
|
|
9
|
+
import type { AuthConfigService } from '../authconfig/service.js';
|
|
10
|
+
import type { AdminService } from '../admin/service.js';
|
|
11
|
+
import type { DirectoryService } from '../directory/service.js';
|
|
12
|
+
import type { HomeService } from '../home/service.js';
|
|
9
13
|
import type { Subject } from '../identity/types.js';
|
|
14
|
+
import { ApiError } from '../types.js';
|
|
10
15
|
export interface ApiRequest {
|
|
11
16
|
query?: Record<string, string | undefined>;
|
|
12
17
|
body?: Record<string, unknown>;
|
|
@@ -55,6 +60,26 @@ export interface Services {
|
|
|
55
60
|
* the host is the only one that knows its values.
|
|
56
61
|
*/
|
|
57
62
|
info?: InfoService;
|
|
63
|
+
/**
|
|
64
|
+
* The provider configuration an administrator may read. Absent, `GET
|
|
65
|
+
* /SASjsApi/authConfig` answers 501: the values are the host's environment.
|
|
66
|
+
*/
|
|
67
|
+
authConfig?: AuthConfigService;
|
|
68
|
+
/**
|
|
69
|
+
* What the host is doing - diagnostics, log files, log tails. Absent, the
|
|
70
|
+
* three Admin reports answer 501: a browser build has no process to describe.
|
|
71
|
+
*/
|
|
72
|
+
admin?: AdminService;
|
|
73
|
+
/**
|
|
74
|
+
* A directory to import accounts from. Absent, the LDAP import answers 501:
|
|
75
|
+
* the connection is the host's.
|
|
76
|
+
*/
|
|
77
|
+
directory?: DirectoryService;
|
|
78
|
+
/**
|
|
79
|
+
* The web interface's shell. Absent, `GET /` answers 501: the page is a file
|
|
80
|
+
* only the host holds.
|
|
81
|
+
*/
|
|
82
|
+
home?: HomeService;
|
|
58
83
|
drive: DriveService;
|
|
59
84
|
/**
|
|
60
85
|
* Users, clients and tokens. A host without one answers 501 for the identity
|
|
@@ -81,6 +106,18 @@ export interface Services {
|
|
|
81
106
|
registry?: AppStreamRegistry;
|
|
82
107
|
}
|
|
83
108
|
export declare const dispatch: (services: Services, routeId: string, request?: ApiRequest) => Promise<ApiResponse>;
|
|
109
|
+
/**
|
|
110
|
+
* The refusal for an operation the table states and this file does not answer.
|
|
111
|
+
*
|
|
112
|
+
* Unreachable while every operation has a handler - `spec/routes.spec` asserts
|
|
113
|
+
* that the table's `implemented` set and `HANDLED_ROUTES` are the same list - but
|
|
114
|
+
* it is kept as the answer a future operation gets if it reaches the document
|
|
115
|
+
* before it reaches the dispatcher, rather than a promise that resolves
|
|
116
|
+
* `undefined`. The reason the table carries travels with it: a host developer
|
|
117
|
+
* reading a 501 wants to know what the operation waits on, not only that it is
|
|
118
|
+
* missing.
|
|
119
|
+
*/
|
|
120
|
+
export declare const noHandler: (routeId: string) => ApiError;
|
|
84
121
|
/** Whether a route is one `dispatch` can answer today. */
|
|
85
122
|
export declare const HANDLED_ROUTES: string[];
|
|
86
123
|
//# sourceMappingURL=dispatch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../../src/host/dispatch.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,KAAK,EAAE,WAAW,E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,UAAe,KACvB,OAAO,CAAC,WAAW,CA4oBrB,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,GAAI,SAAS,MAAM,KAAG,QAO3C,CAAA;AAED,0DAA0D;AAC1D,eAAO,MAAM,cAAc,EAAE,MAAM,EA8DlC,CAAA"}
|
|
@@ -184,6 +184,14 @@ export const dispatch = async (services, routeId, request = {}) => {
|
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
switch (routeId) {
|
|
187
|
+
// The shell is a body, not JSON: an HTML page served with the content type
|
|
188
|
+
// the document states, as it came from the host (stamped, if it references
|
|
189
|
+
// a bundle).
|
|
190
|
+
case 'GET /': {
|
|
191
|
+
if (!services.home)
|
|
192
|
+
throw new ApiError(501, `This host has no home service, so it cannot answer ${routeId}.`);
|
|
193
|
+
return { status: 200, contents: await services.home.home() };
|
|
194
|
+
}
|
|
187
195
|
// The one answer a host states rather than derives: public, pre-auth, and
|
|
188
196
|
// read by the login screen before anything else.
|
|
189
197
|
case 'GET /SASjsApi/info': {
|
|
@@ -191,6 +199,40 @@ export const dispatch = async (services, routeId, request = {}) => {
|
|
|
191
199
|
throw new ApiError(501, `This host has no info service, so it cannot answer ${routeId}.`);
|
|
192
200
|
return { status: 200, body: await services.info.info() };
|
|
193
201
|
}
|
|
202
|
+
// ------------------------------------------------- a host's own reports
|
|
203
|
+
//
|
|
204
|
+
// The administrator middleware is the host's (sasjs/server mounts
|
|
205
|
+
// authenticateAccessToken and verifyAdmin ahead of all of these), which is
|
|
206
|
+
// why their 401 is marked host-only in the overlay. The package answers a
|
|
207
|
+
// body, and for a log tail the refusals that belong to the name rule.
|
|
208
|
+
case 'GET /SASjsApi/admin/diagnostics': {
|
|
209
|
+
if (!services.admin)
|
|
210
|
+
throw new ApiError(501, `This host has no admin service, so it cannot answer ${routeId}.`);
|
|
211
|
+
return { status: 200, body: await services.admin.diagnostics() };
|
|
212
|
+
}
|
|
213
|
+
case 'GET /SASjsApi/admin/logs': {
|
|
214
|
+
if (!services.admin)
|
|
215
|
+
throw new ApiError(501, `This host has no admin service, so it cannot answer ${routeId}.`);
|
|
216
|
+
return { status: 200, body: { files: await services.admin.logs() } };
|
|
217
|
+
}
|
|
218
|
+
case 'GET /SASjsApi/admin/logs/{fileName}': {
|
|
219
|
+
if (!services.admin)
|
|
220
|
+
throw new ApiError(501, `This host has no admin service, so it cannot answer ${routeId}.`);
|
|
221
|
+
return {
|
|
222
|
+
status: 200,
|
|
223
|
+
body: await services.admin.logTail(String(params.fileName ?? ''), query.lines)
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
case 'GET /SASjsApi/authConfig': {
|
|
227
|
+
if (!services.authConfig)
|
|
228
|
+
throw new ApiError(501, `This host has no auth-config service, so it cannot answer ${routeId}.`);
|
|
229
|
+
return { status: 200, body: await services.authConfig.authConfig() };
|
|
230
|
+
}
|
|
231
|
+
case 'POST /SASjsApi/authConfig/synchroniseWithLDAP': {
|
|
232
|
+
if (!services.directory)
|
|
233
|
+
throw new ApiError(501, `This host has no directory service, so it cannot answer ${routeId}.`);
|
|
234
|
+
return { status: 200, body: await services.directory.synchronise() };
|
|
235
|
+
}
|
|
194
236
|
case 'GET /SASjsApi/drive/file': {
|
|
195
237
|
const file = await drive.read(String(query._filePath || ''));
|
|
196
238
|
return { status: 200, contents: file.contents };
|
|
@@ -502,18 +544,34 @@ export const dispatch = async (services, routeId, request = {}) => {
|
|
|
502
544
|
newPassword: String(body.newPassword ?? '')
|
|
503
545
|
});
|
|
504
546
|
return { status: 204 };
|
|
505
|
-
default:
|
|
506
|
-
|
|
507
|
-
// reading a 501 wants to know what the operation waits on, not only that
|
|
508
|
-
// it is missing.
|
|
509
|
-
const reason = routeById(routeId)?.reason;
|
|
510
|
-
throw new ApiError(501, `This package has no handler for ${routeId}.${reason ? ` ${reason}` : ''}`);
|
|
511
|
-
}
|
|
547
|
+
default:
|
|
548
|
+
throw noHandler(routeId);
|
|
512
549
|
}
|
|
513
550
|
};
|
|
551
|
+
/**
|
|
552
|
+
* The refusal for an operation the table states and this file does not answer.
|
|
553
|
+
*
|
|
554
|
+
* Unreachable while every operation has a handler - `spec/routes.spec` asserts
|
|
555
|
+
* that the table's `implemented` set and `HANDLED_ROUTES` are the same list - but
|
|
556
|
+
* it is kept as the answer a future operation gets if it reaches the document
|
|
557
|
+
* before it reaches the dispatcher, rather than a promise that resolves
|
|
558
|
+
* `undefined`. The reason the table carries travels with it: a host developer
|
|
559
|
+
* reading a 501 wants to know what the operation waits on, not only that it is
|
|
560
|
+
* missing.
|
|
561
|
+
*/
|
|
562
|
+
export const noHandler = (routeId) => {
|
|
563
|
+
const reason = routeById(routeId)?.reason;
|
|
564
|
+
return new ApiError(501, `This package has no handler for ${routeId}.${reason ? ` ${reason}` : ''}`);
|
|
565
|
+
};
|
|
514
566
|
/** Whether a route is one `dispatch` can answer today. */
|
|
515
567
|
export const HANDLED_ROUTES = [
|
|
568
|
+
'GET /',
|
|
516
569
|
'GET /SASjsApi/info',
|
|
570
|
+
'GET /SASjsApi/admin/diagnostics',
|
|
571
|
+
'GET /SASjsApi/admin/logs',
|
|
572
|
+
'GET /SASjsApi/admin/logs/{fileName}',
|
|
573
|
+
'GET /SASjsApi/authConfig',
|
|
574
|
+
'POST /SASjsApi/authConfig/synchroniseWithLDAP',
|
|
517
575
|
'POST /SASjsApi/drive/deploy/upload',
|
|
518
576
|
'DELETE /SASjsApi/drive/deploy',
|
|
519
577
|
'GET /SASjsApi/stp/execute',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-store.d.ts","sourceRoot":"","sources":["../../../src/identity/memory-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,wBAAwB,EACxB,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,QAAQ,EACR,aAAa,EACb,OAAO,EACP,OAAO,EACP,SAAS,EACT,UAAU,EACX,MAAM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AC;IAIzD,MAAM,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC;IAIxC,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC;IAIhE,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC;IAInE,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAe1D,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAMvC,UAAU,CACd,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC;IAOrC,eAAe,CACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC;IAOrC,WAAW,IAAI,OAAO,CAAC,wBAAwB,EAAE,CAAC;IAIlD,cAAc,CAClB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,wBAAwB,GAAG,SAAS,CAAC;IAI1C,gBAAgB,CACpB,KAAK,EAAE,aAAa,GACnB,OAAO,CAAC,wBAAwB,CAAC;IAa9B,oBAAoB,CACxB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,wBAAwB,GAAG,SAAS,CAAC;IAO1C,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI5C,OAAO,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAI1C,YAAY,CAChB,KAAK,EAAE,oBAAoB,GAC1B,OAAO,CAAC,oBAAoB,CAAC;CASjC"}
|
|
@@ -307,7 +307,10 @@ export class MemoryIdentityStore {
|
|
|
307
307
|
name: input.name,
|
|
308
308
|
description: input.description,
|
|
309
309
|
isActive: input.isActive,
|
|
310
|
-
users: []
|
|
310
|
+
users: [],
|
|
311
|
+
...(input.authProvider === undefined
|
|
312
|
+
? {}
|
|
313
|
+
: { authProvider: input.authProvider })
|
|
311
314
|
};
|
|
312
315
|
this.groupList.set(group.uid, group);
|
|
313
316
|
return group;
|
|
@@ -168,6 +168,11 @@ export interface NewGroup {
|
|
|
168
168
|
name: string;
|
|
169
169
|
description: string;
|
|
170
170
|
isActive: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* Set when an external provider manages the group - the directory import
|
|
173
|
+
* marks the groups it creates, so a host can tell them apart from local ones.
|
|
174
|
+
*/
|
|
175
|
+
authProvider?: string;
|
|
171
176
|
}
|
|
172
177
|
export interface NewPermission {
|
|
173
178
|
path: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/identity/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,iFAAiF;AACjF,MAAM,WAAW,OAAO;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,OAAO,CAAA;IACjB,qBAAqB,EAAE,OAAO,CAAA;CAC/B;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAA;IAChB,kEAAkE;IAClE,qBAAqB,EAAE,MAAM,CAAA;IAC7B,qCAAqC;IACrC,sBAAsB,EAAE,MAAM,CAAA;CAC/B;AAED,MAAM,WAAW,SAAS;IACxB,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;CACrB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,aAAa;IAC5B,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC,CAAA;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,cAAc;IAC1D,YAAY,EAAE,MAAM,CAAA;CACrB;AAED,gFAAgF;AAChF,MAAM,WAAW,OAAO;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,qEAAqE;AACrE,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,OAAO,CAAA;IACjB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;CACf"}
|
package/build/esm/index.d.ts
CHANGED
|
@@ -31,6 +31,12 @@ export { createIdentityService } from './identity/service.js';
|
|
|
31
31
|
export { createRecordService, sanitiseDisplayName } from './identity/records.js';
|
|
32
32
|
export { CODE_CORPUS } from './corpus/code.js';
|
|
33
33
|
export { INFO_CORPUS } from './corpus/info.js';
|
|
34
|
+
export { ADMIN_CORPUS } from './corpus/admin.js';
|
|
35
|
+
export { AUTH_CONFIG_CORPUS } from './corpus/authconfig.js';
|
|
36
|
+
export { DIRECTORY_CORPUS } from './corpus/directory.js';
|
|
37
|
+
export { HOME_CORPUS } from './corpus/home.js';
|
|
38
|
+
export { BUNDLE_NAME, NO_WEB_BUILD, createHomeService, withBundleVersion } from './home/service.js';
|
|
39
|
+
export type { HomeService, WebPage } from './home/service.js';
|
|
34
40
|
export { BROWSER_INFO, createInfoService, normaliseInfo } from './info/service.js';
|
|
35
41
|
export type { InfoResponse, InfoService } from './info/service.js';
|
|
36
42
|
export type { AuthorizedRoutesResponse, GroupDetailsResponse, GroupResponse, PermissionResponse, RecordServiceOptions, RecordService, UserDetailsResponse, UserResponse } from './identity/records.js';
|
package/build/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,cAAc,YAAY,CAAA;AAC1B,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,OAAO,EACP,QAAQ,EACR,MAAM,EACP,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,iBAAiB,EAClB,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EACV,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,UAAU,EACX,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EACV,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,SAAS,EACT,SAAS,EACV,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAChE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,O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AAE,UAAU,EAAE,MAAM,oBAAoB,CAAA"}
|
package/build/esm/index.js
CHANGED
|
@@ -27,6 +27,11 @@ export { createIdentityService } from './identity/service.js';
|
|
|
27
27
|
export { createRecordService, sanitiseDisplayName } from './identity/records.js';
|
|
28
28
|
export { CODE_CORPUS } from './corpus/code.js';
|
|
29
29
|
export { INFO_CORPUS } from './corpus/info.js';
|
|
30
|
+
export { ADMIN_CORPUS } from './corpus/admin.js';
|
|
31
|
+
export { AUTH_CONFIG_CORPUS } from './corpus/authconfig.js';
|
|
32
|
+
export { DIRECTORY_CORPUS } from './corpus/directory.js';
|
|
33
|
+
export { HOME_CORPUS } from './corpus/home.js';
|
|
34
|
+
export { BUNDLE_NAME, NO_WEB_BUILD, createHomeService, withBundleVersion } from './home/service.js';
|
|
30
35
|
export { BROWSER_INFO, createInfoService, normaliseInfo } from './info/service.js';
|
|
31
36
|
export { MemoryIdentityStore } from './identity/memory-store.js';
|
|
32
37
|
export { DEFAULT_IDENTITY, IDENTITY_FORMAT, parseIdentity } from './identity/fixture.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated.d.ts","sourceRoot":"","sources":["../../../src/routes/generated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEjD,eAAO,MAAM,gBAAgB,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"generated.d.ts","sourceRoot":"","sources":["../../../src/routes/generated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEjD,eAAO,MAAM,gBAAgB,EAAE,cAAc,EAshE5C,CAAA"}
|
|
@@ -26,6 +26,14 @@ export const GENERATED_ROUTES = [
|
|
|
26
26
|
{
|
|
27
27
|
status: 200,
|
|
28
28
|
description: 'Ok'
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
status: 401,
|
|
32
|
+
description: 'Unauthorized, or an administrator account is required. The mount point in routes/api/index.ts applies both checks before this handler runs.'
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
status: 500,
|
|
36
|
+
description: 'The diagnostics could not be read'
|
|
29
37
|
}
|
|
30
38
|
]
|
|
31
39
|
},
|
|
@@ -41,6 +49,14 @@ export const GENERATED_ROUTES = [
|
|
|
41
49
|
{
|
|
42
50
|
status: 200,
|
|
43
51
|
description: 'Ok'
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
status: 401,
|
|
55
|
+
description: 'Unauthorized, or an administrator account is required. The mount point in routes/api/index.ts applies both checks before this handler runs.'
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
status: 500,
|
|
59
|
+
description: 'The log folder could not be listed'
|
|
44
60
|
}
|
|
45
61
|
]
|
|
46
62
|
},
|
|
@@ -69,6 +85,22 @@ export const GENERATED_ROUTES = [
|
|
|
69
85
|
{
|
|
70
86
|
status: 200,
|
|
71
87
|
description: 'Ok'
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
status: 400,
|
|
91
|
+
description: 'Invalid log file name.'
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
status: 401,
|
|
95
|
+
description: 'Unauthorized, or an administrator account is required. The mount point in routes/api/index.ts applies both checks before this handler runs.'
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
status: 404,
|
|
99
|
+
description: 'Log file not found.'
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
status: 500,
|
|
103
|
+
description: 'The log file could not be read'
|
|
72
104
|
}
|
|
73
105
|
]
|
|
74
106
|
},
|
|
@@ -206,6 +238,18 @@ export const GENERATED_ROUTES = [
|
|
|
206
238
|
{
|
|
207
239
|
status: 200,
|
|
208
240
|
description: 'Ok'
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
status: 401,
|
|
244
|
+
description: 'Unauthorized, or an administrator account is required. The mount point in routes/api/index.ts applies both checks before this handler runs.'
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
status: 403,
|
|
248
|
+
description: 'Not Allowed while in Desktop Mode.'
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
status: 500,
|
|
252
|
+
description: 'The provider configuration could not be read'
|
|
209
253
|
}
|
|
210
254
|
]
|
|
211
255
|
},
|
|
@@ -221,6 +265,18 @@ export const GENERATED_ROUTES = [
|
|
|
221
265
|
{
|
|
222
266
|
status: 200,
|
|
223
267
|
description: 'Ok'
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
status: 401,
|
|
271
|
+
description: 'Unauthorized, or an administrator account is required. The mount point in routes/api/index.ts applies both checks before this handler runs.'
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
status: 403,
|
|
275
|
+
description: 'Not Allowed while in Desktop Mode.'
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
status: 500,
|
|
279
|
+
description: 'The directory could not be synchronised'
|
|
224
280
|
}
|
|
225
281
|
]
|
|
226
282
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../src/routes/overlay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAGzD,yDAAyD;AACzD,UAAU,aAAa;IACrB,YAAY,CAAC,EAAE,UAAU,EAAE,CAAA;IAC3B;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACpC;AAED;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,aAAa,GACtC,CAAC;IAAE,WAAW,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,WAAW,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAElE,kFAAkF;AAClF,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,CAczD,CAAA;
|
|
1
|
+
{"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../src/routes/overlay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAGzD,yDAAyD;AACzD,UAAU,aAAa;IACrB,YAAY,CAAC,EAAE,UAAU,EAAE,CAAA;IAC3B;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACpC;AAED;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,aAAa,GACtC,CAAC;IAAE,WAAW,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,WAAW,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAElE,kFAAkF;AAClF,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,CAczD,CAAA;AAmBD,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CA+ThD,CAAA;AAED,wEAAwE;AACxE,eAAO,MAAM,OAAO,EAAE,UAAU,EAA8C,CAAA"}
|
|
@@ -22,10 +22,6 @@ export const TAG_CAPABILITIES = {
|
|
|
22
22
|
* operation waits on, and thirty copies of the same sentence would say the same
|
|
23
23
|
* thing thirty times.
|
|
24
24
|
*/
|
|
25
|
-
const DIRECTORY = 'Synchronising with an external auth provider needs a directory port, which this package does not have: a host decides which directory it holds accounts in, and answers this itself.';
|
|
26
|
-
const HOST_CONFIG = "The body is the host's own provider configuration - the directory URL, bind DN and which secrets are set - which a mock states for itself and this package cannot know.";
|
|
27
|
-
const HOST_OWNED = "The host owns this report: it describes the host's own process and files, which a browser build has no equivalent of.";
|
|
28
|
-
const WEB_BUNDLE = 'The host serves its own web bundle; there is no API decision here for this package to answer.';
|
|
29
25
|
const success = { status: 'success' };
|
|
30
26
|
const user = {
|
|
31
27
|
uid: '',
|
|
@@ -35,8 +31,17 @@ const user = {
|
|
|
35
31
|
needsToUpdatePassword: false
|
|
36
32
|
};
|
|
37
33
|
export const OVERLAY = {
|
|
38
|
-
// Web - the sign-in pages the identity service answers, and the
|
|
39
|
-
|
|
34
|
+
// Web - the sign-in pages the identity service answers, and the shell itself.
|
|
35
|
+
// The page is the host's file; the stamping rule that keeps a cached shell
|
|
36
|
+
// from pinning an old bundle is the package's.
|
|
37
|
+
'GET /': {
|
|
38
|
+
implemented: true,
|
|
39
|
+
// public: the shell is what an unauthenticated browser asks for first
|
|
40
|
+
capabilities: [],
|
|
41
|
+
responses: {
|
|
42
|
+
200: '<html><head></head><body>Web Build is not present</body></html>'
|
|
43
|
+
}
|
|
44
|
+
},
|
|
40
45
|
'POST /SASLogon/login': {
|
|
41
46
|
implemented: true,
|
|
42
47
|
// The lockout and the provider failure are answered before the package is
|
|
@@ -53,12 +58,71 @@ export const OVERLAY = {
|
|
|
53
58
|
hostResponses: [500],
|
|
54
59
|
responses: { 200: 'OK!' }
|
|
55
60
|
},
|
|
56
|
-
// Admin - the host's own process and files
|
|
57
|
-
|
|
58
|
-
|
|
61
|
+
// Admin - the host's own process and files, over the reports it supplies.
|
|
62
|
+
// The administrator check is the host's mount point (sasjs/server puts
|
|
63
|
+
// authenticateAccessToken and verifyAdmin in front of all three), so its 401
|
|
64
|
+
// - and the 500 a genuine failure answers - are host-only statuses.
|
|
65
|
+
'GET /SASjsApi/admin/diagnostics': {
|
|
66
|
+
implemented: true,
|
|
67
|
+
hostResponses: [401, 500],
|
|
68
|
+
responses: {
|
|
69
|
+
200: {
|
|
70
|
+
build: { version: '', gitHash: '', buildDate: null },
|
|
71
|
+
server: {
|
|
72
|
+
mode: 'desktop',
|
|
73
|
+
uptimeSeconds: 0,
|
|
74
|
+
startedAt: '',
|
|
75
|
+
pid: 0,
|
|
76
|
+
nodeVersion: '',
|
|
77
|
+
platform: '',
|
|
78
|
+
arch: '',
|
|
79
|
+
cpuCount: 0,
|
|
80
|
+
cpuModel: '',
|
|
81
|
+
loadAverage: [],
|
|
82
|
+
runTimes: [],
|
|
83
|
+
sasjsRoot: ''
|
|
84
|
+
},
|
|
85
|
+
memory: {
|
|
86
|
+
rssBytes: 0,
|
|
87
|
+
heapTotalBytes: 0,
|
|
88
|
+
heapUsedBytes: 0,
|
|
89
|
+
externalBytes: 0,
|
|
90
|
+
systemTotalBytes: 0,
|
|
91
|
+
systemFreeBytes: 0
|
|
92
|
+
},
|
|
93
|
+
filesystem: null,
|
|
94
|
+
folders: [],
|
|
95
|
+
logs: {
|
|
96
|
+
folder: '',
|
|
97
|
+
fileCount: 0,
|
|
98
|
+
totalBytes: 0,
|
|
99
|
+
newestFile: null,
|
|
100
|
+
newestModified: null
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
'GET /SASjsApi/admin/logs': {
|
|
106
|
+
implemented: true,
|
|
107
|
+
hostResponses: [401, 500],
|
|
108
|
+
responses: { 200: { files: [] } }
|
|
109
|
+
},
|
|
59
110
|
'GET /SASjsApi/admin/logs/{fileName}': {
|
|
60
|
-
implemented:
|
|
61
|
-
|
|
111
|
+
implemented: true,
|
|
112
|
+
// 400 and 404 are the name rule's, and this package answers them before the
|
|
113
|
+
// host is asked for anything
|
|
114
|
+
hostResponses: [401, 500],
|
|
115
|
+
responses: {
|
|
116
|
+
200: {
|
|
117
|
+
fileName: '',
|
|
118
|
+
lines: 0,
|
|
119
|
+
bytesRead: 0,
|
|
120
|
+
truncated: false,
|
|
121
|
+
content: ''
|
|
122
|
+
},
|
|
123
|
+
400: 'Invalid log file name.',
|
|
124
|
+
404: 'Log file not found.'
|
|
125
|
+
}
|
|
62
126
|
},
|
|
63
127
|
// Auth - the token flow, plus a password change the identity store cannot write
|
|
64
128
|
'POST /SASjsApi/auth/token': {
|
|
@@ -76,11 +140,29 @@ export const OVERLAY = {
|
|
|
76
140
|
// has gone, which a host's store can see and this package cannot.
|
|
77
141
|
hostResponses: [404]
|
|
78
142
|
},
|
|
79
|
-
// Auth Config - the providers a host was started with, and an LDAP import
|
|
80
|
-
|
|
143
|
+
// Auth Config - the providers a host was started with, and an LDAP import.
|
|
144
|
+
// Both are administrator routes at the host's mount point, so 401 and the
|
|
145
|
+
// host's own 500 are host-only statuses; the package answers the body, and
|
|
146
|
+
// refuses a secret that a host tries to hand it.
|
|
147
|
+
'GET /SASjsApi/authConfig': {
|
|
148
|
+
implemented: true,
|
|
149
|
+
hostResponses: [401, 403, 500],
|
|
150
|
+
responses: {
|
|
151
|
+
200: {
|
|
152
|
+
ldap: {
|
|
153
|
+
LDAP_URL: '',
|
|
154
|
+
LDAP_BIND_DN: '',
|
|
155
|
+
LDAP_USERS_BASE_DN: '',
|
|
156
|
+
LDAP_GROUPS_BASE_DN: '',
|
|
157
|
+
LDAP_BIND_PASSWORD_SET: true
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
},
|
|
81
162
|
'POST /SASjsApi/authConfig/synchroniseWithLDAP': {
|
|
82
|
-
implemented:
|
|
83
|
-
|
|
163
|
+
implemented: true,
|
|
164
|
+
hostResponses: [401, 403, 500],
|
|
165
|
+
responses: { 200: { userCount: 0, groupCount: 0 } }
|
|
84
166
|
},
|
|
85
167
|
// Client - the OAuth clients the identity store already holds for sign-in
|
|
86
168
|
'GET /SASjsApi/client': { implemented: true },
|
package/package.json
CHANGED