@genesislcap/foundation-login 14.67.5-alpha-af2ec8e407.0 → 14.67.5-alpha-e36b6f2.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.
@@ -1,4 +1,4 @@
1
1
  export * from './main';
2
2
  export * from './routes';
3
- export * from './utils';
3
+ export * from './utils/sso';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"login-form.d.ts","sourceRoot":"","sources":["../../../../src/routes/login-form/login-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAKpE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAI/B,qBAKa,SAAU,SAAQ,SAAS;IAC1B,IAAI,EAAE,GAAG,EAAE,CAAM;IACjB,WAAW,EAAE,MAAM,CAAM;IACzB,UAAU,EAAE,OAAO,CAAS;IAElC,iBAAiB;IAejB,KAAK;IAeL,gBAAgB,IAAI,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC;IAStD,OAAO,CAAC,yBAAyB;IA8BjC,OAAO,CAAC,iBAAiB;IAczB,iBAAiB;IAajB,IACI,eAAe,WAElB;IAED,cAAc,MAAO,WAAW,KAAG,IAAI,CAIrC;IAEF,UAAU;IAiBV,OAAO,CAAC,cAAc;IAQhB,YAAY;IAIZ,aAAa;IAOb,KAAK,CAAC,WAAW,EAAE,QAAQ;IAqCjC,IACI,iBAAiB,6BAEpB;IAED,IAAI,qBAAqB,YAExB;IAED,IAAI,cAAc,YAEjB;CACF"}
1
+ {"version":3,"file":"login-form.d.ts","sourceRoot":"","sources":["../../../../src/routes/login-form/login-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAKpE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAI/B,qBAKa,SAAU,SAAQ,SAAS;IAC1B,IAAI,EAAE,GAAG,EAAE,CAAM;IACjB,WAAW,EAAE,MAAM,CAAM;IACzB,UAAU,EAAE,OAAO,CAAS;IAElC,iBAAiB;IAejB,KAAK;IAeL,gBAAgB,IAAI,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC;IAStD,OAAO,CAAC,yBAAyB;IA8BjC,OAAO,CAAC,iBAAiB;IAczB,iBAAiB;IAcjB,IACI,eAAe,WAElB;IAED,cAAc,MAAO,WAAW,KAAG,IAAI,CAIrC;IAEF,UAAU;IAiBV,OAAO,CAAC,cAAc;IAQhB,YAAY;IAIZ,aAAa;IAOb,KAAK,CAAC,WAAW,EAAE,QAAQ;IAqCjC,IACI,iBAAiB,6BAEpB;IAED,IAAI,qBAAqB,YAExB;IAED,IAAI,cAAc,YAEjB;CACF"}
@@ -1,7 +1,2 @@
1
- /**
2
- * Logger instance used by login micro-frontend
3
- *
4
- * @internal
5
- */
6
1
  export declare const logger: import("@genesislcap/foundation-utils").Logger;
7
2
  //# sourceMappingURL=logger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/utils/logger.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,MAAM,gDAAmC,CAAC"}
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/utils/logger.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,gDAAmC,CAAC"}
@@ -1,18 +1,6 @@
1
1
  import type { IDP } from '../routes/types';
2
2
  /**
3
- * Get HTTP version of API Host URL
4
- *
5
- * @public
6
- */
7
- export declare const getAPIHostHTTPURL: (host?: string) => string;
8
- /**
9
- * Get IPD Endpoint URL
10
- *
11
- * @public
12
- */
13
- export declare const getIPDEndpoint: (path?: string, host?: string) => string;
14
- /**
15
- * Get SSO Login URL
3
+ * Get SSO identity provider login URL
16
4
  *
17
5
  * @public
18
6
  */
@@ -22,5 +10,5 @@ export declare const getSSOLoginURL: (idp: any, path?: string, host?: string) =>
22
10
  *
23
11
  * @public
24
12
  */
25
- export declare const fetchIDPs: (host?: string) => Promise<IDP[]>;
13
+ export declare const fetchIDPs: (path?: string, host?: string) => Promise<IDP[]>;
26
14
  //# sourceMappingURL=sso.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sso.d.ts","sourceRoot":"","sources":["../../../src/utils/sso.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAe,MAAM,iBAAiB,CAAC;AAGxD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,2BAI7B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,0CACU,CAAC;AAEtC;;;;GAIG;AACH,eAAO,MAAM,cAAc,oDAK1B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS,qBAA4B,QAAQ,GAAG,EAAE,CAkB9D,CAAC"}
1
+ {"version":3,"file":"sso.d.ts","sourceRoot":"","sources":["../../../src/utils/sso.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAe,MAAM,iBAAiB,CAAC;AAWxD;;;;GAIG;AACH,eAAO,MAAM,cAAc,oDAK1B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS,oCAA+C,QAAQ,GAAG,EAAE,CAkBjF,CAAC"}
package/dist/esm/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export * from './main';
2
2
  export * from './routes';
3
- export * from './utils';
3
+ export * from './utils/sso';
@@ -105,9 +105,11 @@ let LoginForm = class LoginForm extends BaseRoute {
105
105
  this.login(basicCredentials);
106
106
  }
107
107
  ssoToggledChanged() {
108
+ var _a, _b;
108
109
  this.clearError();
109
110
  if (this.ssoToggled) {
110
- fetchIDPs()
111
+ const path = `${(_b = (_a = this.config.sso) === null || _a === void 0 ? void 0 : _a.identityProvidersPath) !== null && _b !== void 0 ? _b : 'sso/list'}`;
112
+ fetchIDPs(path)
111
113
  .then((idps) => {
112
114
  var _a, _b;
113
115
  logger.debug('fetched IDPs', idps);
@@ -1,7 +1,2 @@
1
1
  import { createLogger } from '@genesislcap/foundation-utils';
2
- /**
3
- * Logger instance used by login micro-frontend
4
- *
5
- * @internal
6
- */
7
2
  export const logger = createLogger('foundation-login');
@@ -1,24 +1,14 @@
1
1
  import { __awaiter } from "tslib";
2
2
  import { API_HOST } from '@genesislcap/foundation-utils';
3
3
  import { logger } from './logger';
4
- /**
5
- * Get HTTP version of API Host URL
6
- *
7
- * @public
8
- */
9
- export const getAPIHostHTTPURL = (host = API_HOST) => {
4
+ const getAPIHostHTTPURL = (host = API_HOST) => {
10
5
  const url = new URL(host);
11
6
  const protocol = url.protocol.replace('ws', 'http');
12
7
  return `${protocol}//${url.host}${url.pathname}`;
13
8
  };
9
+ const getIPDEndpoint = (path, host) => `${getAPIHostHTTPURL(host)}${path}`;
14
10
  /**
15
- * Get IPD Endpoint URL
16
- *
17
- * @public
18
- */
19
- export const getIPDEndpoint = (path = 'sso/list', host = API_HOST) => `${getAPIHostHTTPURL(host)}${path}`;
20
- /**
21
- * Get SSO Login URL
11
+ * Get SSO identity provider login URL
22
12
  *
23
13
  * @public
24
14
  */
@@ -33,8 +23,8 @@ export const getSSOLoginURL = (idp, path = '/login?idp=', host = API_HOST) => {
33
23
  *
34
24
  * @public
35
25
  */
36
- export const fetchIDPs = (host = API_HOST) => __awaiter(void 0, void 0, void 0, function* () {
37
- const IDP_ENDPOINT = getIPDEndpoint(host);
26
+ export const fetchIDPs = (path = 'sso/list', host = API_HOST) => __awaiter(void 0, void 0, void 0, function* () {
27
+ const IDP_ENDPOINT = getIPDEndpoint(path, host);
38
28
  return fetch(IDP_ENDPOINT)
39
29
  .then((res) => {
40
30
  if (res.ok)
@@ -487,7 +487,7 @@
487
487
  },
488
488
  {
489
489
  "kind": "Content",
490
- "text": "(host?: string) => "
490
+ "text": "(path?: string, host?: string) => "
491
491
  },
492
492
  {
493
493
  "kind": "Reference",
@@ -605,56 +605,10 @@
605
605
  "endIndex": 10
606
606
  }
607
607
  },
608
- {
609
- "kind": "Variable",
610
- "canonicalReference": "@genesislcap/foundation-login!getAPIHostHTTPURL:var",
611
- "docComment": "/**\n * Get HTTP version of API Host URL\n *\n * @public\n */\n",
612
- "excerptTokens": [
613
- {
614
- "kind": "Content",
615
- "text": "getAPIHostHTTPURL: "
616
- },
617
- {
618
- "kind": "Content",
619
- "text": "(host?: string) => string"
620
- }
621
- ],
622
- "fileUrlPath": "src/utils/sso.ts",
623
- "isReadonly": true,
624
- "releaseTag": "Public",
625
- "name": "getAPIHostHTTPURL",
626
- "variableTypeTokenRange": {
627
- "startIndex": 1,
628
- "endIndex": 2
629
- }
630
- },
631
- {
632
- "kind": "Variable",
633
- "canonicalReference": "@genesislcap/foundation-login!getIPDEndpoint:var",
634
- "docComment": "/**\n * Get IPD Endpoint URL\n *\n * @public\n */\n",
635
- "excerptTokens": [
636
- {
637
- "kind": "Content",
638
- "text": "getIPDEndpoint: "
639
- },
640
- {
641
- "kind": "Content",
642
- "text": "(path?: string, host?: string) => string"
643
- }
644
- ],
645
- "fileUrlPath": "src/utils/sso.ts",
646
- "isReadonly": true,
647
- "releaseTag": "Public",
648
- "name": "getIPDEndpoint",
649
- "variableTypeTokenRange": {
650
- "startIndex": 1,
651
- "endIndex": 2
652
- }
653
- },
654
608
  {
655
609
  "kind": "Variable",
656
610
  "canonicalReference": "@genesislcap/foundation-login!getSSOLoginURL:var",
657
- "docComment": "/**\n * Get SSO Login URL\n *\n * @public\n */\n",
611
+ "docComment": "/**\n * Get SSO identity provider login URL\n *\n * @public\n */\n",
658
612
  "excerptTokens": [
659
613
  {
660
614
  "kind": "Content",
@@ -9,7 +9,6 @@ import { ElementStyles } from '@microsoft/fast-element';
9
9
  import { FASTElement } from '@microsoft/fast-element';
10
10
  import { FoundationAnalytics } from '@genesislcap/foundation-comms';
11
11
  import { InterfaceSymbol } from '@microsoft/fast-foundation';
12
- import { Logger } from '@genesislcap/foundation-utils';
13
12
  import { Message } from '@genesislcap/foundation-comms';
14
13
  import { MessageBuilder } from '@genesislcap/foundation-comms';
15
14
  import { PartialFASTElementDefinition } from '@microsoft/fast-element';
@@ -233,7 +232,7 @@ export declare const emailField: <T extends BaseRoute>() => ViewTemplate<T, any>
233
232
  *
234
233
  * @public
235
234
  */
236
- export declare const fetchIDPs: (host?: string) => Promise<IDP[]>;
235
+ export declare const fetchIDPs: (path?: string, host?: string) => Promise<IDP[]>;
237
236
 
238
237
  /**
239
238
  * @public
@@ -276,21 +275,7 @@ export declare type FieldConfigMap = {
276
275
  };
277
276
 
278
277
  /**
279
- * Get HTTP version of API Host URL
280
- *
281
- * @public
282
- */
283
- export declare const getAPIHostHTTPURL: (host?: string) => string;
284
-
285
- /**
286
- * Get IPD Endpoint URL
287
- *
288
- * @public
289
- */
290
- export declare const getIPDEndpoint: (path?: string, host?: string) => string;
291
-
292
- /**
293
- * Get SSO Login URL
278
+ * Get SSO identity provider login URL
294
279
  *
295
280
  * @public
296
281
  */
@@ -333,13 +318,6 @@ export declare interface IDPResponse {
333
318
  */
334
319
  export declare function isMFRoute(pathname?: string): boolean;
335
320
 
336
- /**
337
- * Logger instance used by login micro-frontend
338
- *
339
- * @internal
340
- */
341
- export declare const logger: Logger;
342
-
343
321
  /**
344
322
  * Defines the login class which handles account authentication from the front-end
345
323
  *
@@ -9,5 +9,5 @@ Request SSO identity provider list
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- fetchIDPs: (host?: string) => Promise<IDP[]>
12
+ fetchIDPs: (path?: string, host?: string) => Promise<IDP[]>
13
13
  ```
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## getSSOLoginURL variable
6
6
 
7
- Get SSO Login URL
7
+ Get SSO identity provider login URL
8
8
 
9
9
  **Signature:**
10
10
 
@@ -40,9 +40,7 @@
40
40
  | [define](./foundation-login.define.md) | **_(BETA)_** Re-define the login micro frontend. |
41
41
  | [definition](./foundation-login.definition.md) | **_(BETA)_** |
42
42
  | [fetchIDPs](./foundation-login.fetchidps.md) | Request SSO identity provider list |
43
- | [getAPIHostHTTPURL](./foundation-login.getapihosthttpurl.md) | Get HTTP version of API Host URL |
44
- | [getIPDEndpoint](./foundation-login.getipdendpoint.md) | Get IPD Endpoint URL |
45
- | [getSSOLoginURL](./foundation-login.getssologinurl.md) | Get SSO Login URL |
43
+ | [getSSOLoginURL](./foundation-login.getssologinurl.md) | Get SSO identity provider login URL |
46
44
  | [hostEnv](./foundation-login.hostenv.md) | |
47
45
  | [hostUrl](./foundation-login.hosturl.md) | |
48
46
  | [Routes](./foundation-login.routes.md) | |
@@ -15,7 +15,6 @@ import { ElementStyles } from '@microsoft/fast-element';
15
15
  import { FASTElement } from '@microsoft/fast-element';
16
16
  import { FoundationAnalytics } from '@genesislcap/foundation-comms';
17
17
  import { InterfaceSymbol } from '@microsoft/fast-foundation';
18
- import { Logger } from '@genesislcap/foundation-utils';
19
18
  import { Message } from '@genesislcap/foundation-comms';
20
19
  import { MessageBuilder } from '@genesislcap/foundation-comms';
21
20
  import { PartialFASTElementDefinition } from '@microsoft/fast-element';
@@ -165,7 +164,7 @@ export const definition: PartialFASTElementDefinition;
165
164
  export const emailField: <T extends BaseRoute>() => ViewTemplate<T, any>;
166
165
 
167
166
  // @public
168
- export const fetchIDPs: (host?: string) => Promise<IDP[]>;
167
+ export const fetchIDPs: (path?: string, host?: string) => Promise<IDP[]>;
169
168
 
170
169
  // @public
171
170
  export type FieldConfig = {
@@ -184,12 +183,6 @@ export type FieldConfigMap = {
184
183
  password: FieldConfig;
185
184
  };
186
185
 
187
- // @public
188
- export const getAPIHostHTTPURL: (host?: string) => string;
189
-
190
- // @public
191
- export const getIPDEndpoint: (path?: string, host?: string) => string;
192
-
193
186
  // @public
194
187
  export const getSSOLoginURL: (idp: any, path?: string, host?: string) => string;
195
188
 
@@ -218,11 +211,6 @@ export interface IDPResponse {
218
211
  // @public
219
212
  export function isMFRoute(pathname?: string): boolean;
220
213
 
221
- // Warning: (ae-internal-missing-underscore) The name "logger" should be prefixed with an underscore because the declaration is marked as @internal
222
- //
223
- // @internal
224
- export const logger: Logger;
225
-
226
214
  // @public
227
215
  export class Login extends FASTElement {
228
216
  // @internal
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-login",
3
3
  "description": "Genesis Foundation Login",
4
- "version": "14.67.5-alpha-af2ec8e407.0",
4
+ "version": "14.67.5-alpha-e36b6f2.0",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "main": "dist/esm/index.js",
7
7
  "types": "dist/foundation-login.d.ts",
@@ -49,15 +49,15 @@
49
49
  "test:debug": "genx test --debug"
50
50
  },
51
51
  "devDependencies": {
52
- "@genesislcap/foundation-testing": "14.67.5-alpha-af2ec8e407.0",
53
- "@genesislcap/genx": "14.67.5-alpha-af2ec8e407.0",
52
+ "@genesislcap/foundation-testing": "14.67.5-alpha-e36b6f2.0",
53
+ "@genesislcap/genx": "14.67.5-alpha-e36b6f2.0",
54
54
  "rimraf": "^3.0.2"
55
55
  },
56
56
  "dependencies": {
57
- "@genesislcap/foundation-comms": "14.67.5-alpha-af2ec8e407.0",
58
- "@genesislcap/foundation-ui": "14.67.5-alpha-af2ec8e407.0",
59
- "@genesislcap/foundation-utils": "14.67.5-alpha-af2ec8e407.0",
60
- "@genesislcap/foundation-zero": "14.67.5-alpha-af2ec8e407.0",
57
+ "@genesislcap/foundation-comms": "14.67.5-alpha-e36b6f2.0",
58
+ "@genesislcap/foundation-ui": "14.67.5-alpha-e36b6f2.0",
59
+ "@genesislcap/foundation-utils": "14.67.5-alpha-e36b6f2.0",
60
+ "@genesislcap/foundation-zero": "14.67.5-alpha-e36b6f2.0",
61
61
  "@microsoft/fast-components": "^2.21.3",
62
62
  "@microsoft/fast-element": "^1.7.0",
63
63
  "@microsoft/fast-foundation": "^2.33.2",
@@ -74,5 +74,5 @@
74
74
  "access": "public"
75
75
  },
76
76
  "customElements": "dist/custom-elements.json",
77
- "gitHead": "1563a10a5ee97dfa323e7a554cc3e0aaf900f8f3"
77
+ "gitHead": "7a22bbc2903c1c0e9e266087f24fb0a9bf87d546"
78
78
  }
@@ -1,13 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [@genesislcap/foundation-login](./foundation-login.md) &gt; [getAPIHostHTTPURL](./foundation-login.getapihosthttpurl.md)
4
-
5
- ## getAPIHostHTTPURL variable
6
-
7
- Get HTTP version of API Host URL
8
-
9
- **Signature:**
10
-
11
- ```typescript
12
- getAPIHostHTTPURL: (host?: string) => string
13
- ```
@@ -1,13 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [@genesislcap/foundation-login](./foundation-login.md) &gt; [getIPDEndpoint](./foundation-login.getipdendpoint.md)
4
-
5
- ## getIPDEndpoint variable
6
-
7
- Get IPD Endpoint URL
8
-
9
- **Signature:**
10
-
11
- ```typescript
12
- getIPDEndpoint: (path?: string, host?: string) => string
13
- ```