@genesislcap/foundation-auth 14.71.1-auth-mf.18 → 14.71.1-auth-mf.20
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/README.md +36 -14
- package/dist/dts/components/core-components.d.ts +2 -0
- package/dist/dts/components/core-components.d.ts.map +1 -0
- package/dist/dts/components/zero-components.d.ts +6 -0
- package/dist/dts/components/zero-components.d.ts.map +1 -0
- package/dist/dts/{main → config}/config.d.ts +13 -39
- package/dist/dts/config/config.d.ts.map +1 -0
- package/dist/dts/config/configure.d.ts +54 -0
- package/dist/dts/config/configure.d.ts.map +1 -0
- package/dist/dts/config/index.d.ts +3 -0
- package/dist/dts/config/index.d.ts.map +1 -0
- package/dist/dts/config/templates.d.ts +38 -0
- package/dist/dts/config/templates.d.ts.map +1 -0
- package/dist/dts/index.d.ts +1 -0
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/machine/machine.d.ts +1 -1
- package/dist/dts/machine/machine.d.ts.map +1 -1
- package/dist/dts/main/index.d.ts +0 -3
- package/dist/dts/main/index.d.ts.map +1 -1
- package/dist/dts/main/main.d.ts +65 -29
- package/dist/dts/main/main.d.ts.map +1 -1
- package/dist/dts/main/main.styles.d.ts +1 -12
- package/dist/dts/main/main.styles.d.ts.map +1 -1
- package/dist/dts/main/main.template.d.ts +2 -3
- package/dist/dts/main/main.template.d.ts.map +1 -1
- package/dist/dts/routes/base.d.ts +8 -14
- package/dist/dts/routes/base.d.ts.map +1 -1
- package/dist/dts/routes/config.d.ts +2 -2
- package/dist/dts/routes/config.d.ts.map +1 -1
- package/dist/dts/routes/forgot-password/forgot-password.d.ts +1 -0
- package/dist/dts/routes/forgot-password/forgot-password.d.ts.map +1 -1
- package/dist/dts/routes/forgot-password/forgot-password.template.d.ts.map +1 -1
- package/dist/dts/routes/index.d.ts +0 -1
- package/dist/dts/routes/index.d.ts.map +1 -1
- package/dist/dts/routes/login/login.d.ts +6 -7
- package/dist/dts/routes/login/login.d.ts.map +1 -1
- package/dist/dts/routes/login/login.styles.d.ts.map +1 -1
- package/dist/dts/routes/login/login.template.d.ts.map +1 -1
- package/dist/dts/routes/logout/logout.d.ts +1 -1
- package/dist/dts/routes/logout/logout.d.ts.map +1 -1
- package/dist/dts/routes/logout/logout.template.d.ts.map +1 -1
- package/dist/dts/routes/protected/protected.template.d.ts.map +1 -1
- package/dist/dts/routes/request-account/request-account.template.d.ts.map +1 -1
- package/dist/dts/routes/reset-password/reset-password.d.ts +2 -1
- package/dist/dts/routes/reset-password/reset-password.d.ts.map +1 -1
- package/dist/dts/routes/reset-password/reset-password.template.d.ts.map +1 -1
- package/dist/dts/routes/routing.d.ts +2 -2
- package/dist/dts/routes/types.d.ts +0 -18
- package/dist/dts/routes/types.d.ts.map +1 -1
- package/dist/dts/routes/verify/verify.template.d.ts.map +1 -1
- package/dist/dts/store/auth.d.ts +1 -1
- package/dist/dts/store/auth.d.ts.map +1 -1
- package/dist/dts/store/authFormEntry.d.ts +21 -5
- package/dist/dts/store/authFormEntry.d.ts.map +1 -1
- package/dist/dts/styles/styles.d.ts.map +1 -1
- package/dist/dts/tags/index.d.ts +2 -0
- package/dist/dts/tags/index.d.ts.map +1 -0
- package/dist/dts/tags/tags.d.ts +59 -0
- package/dist/dts/tags/tags.d.ts.map +1 -0
- package/dist/dts/utils/sso.d.ts +14 -1
- package/dist/dts/utils/sso.d.ts.map +1 -1
- package/dist/esm/components/core-components.js +8 -0
- package/dist/esm/components/zero-components.js +48 -0
- package/dist/esm/{main → config}/config.js +4 -40
- package/dist/esm/config/configure.js +83 -0
- package/dist/esm/config/index.js +2 -0
- package/dist/esm/config/templates.js +18 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/machine/machine.js +1 -9
- package/dist/esm/main/index.js +0 -3
- package/dist/esm/main/main.js +94 -67
- package/dist/esm/main/main.styles.js +20 -33
- package/dist/esm/main/main.template.js +7 -11
- package/dist/esm/routes/base.js +24 -56
- package/dist/esm/routes/config.js +33 -29
- package/dist/esm/routes/forgot-password/forgot-password.js +4 -0
- package/dist/esm/routes/forgot-password/forgot-password.template.js +3 -2
- package/dist/esm/routes/index.js +0 -1
- package/dist/esm/routes/login/login.js +17 -45
- package/dist/esm/routes/login/login.styles.js +3 -9
- package/dist/esm/routes/login/login.template.js +34 -24
- package/dist/esm/routes/logout/logout.js +2 -1
- package/dist/esm/routes/logout/logout.template.js +3 -2
- package/dist/esm/routes/protected/protected.template.js +7 -6
- package/dist/esm/routes/request-account/request-account.template.js +5 -4
- package/dist/esm/routes/reset-password/reset-password.js +6 -4
- package/dist/esm/routes/reset-password/reset-password.template.js +3 -2
- package/dist/esm/routes/routing.js +2 -2
- package/dist/esm/routes/verify/verify.template.js +5 -4
- package/dist/esm/store/auth.js +2 -2
- package/dist/esm/store/authFormEntry.js +50 -3
- package/dist/esm/styles/styles.js +9 -8
- package/dist/esm/tags/index.js +1 -0
- package/dist/esm/tags/tags.js +77 -0
- package/dist/foundation-auth.api.json +531 -385
- package/dist/foundation-auth.d.ts +636 -1033
- package/docs/api/foundation-auth.authconfig.md +3 -1
- package/docs/api/foundation-auth.authconfig.templateoptions.md +18 -0
- package/docs/api/foundation-auth.authformentryeventmap.md +2 -0
- package/docs/api/foundation-auth.authformentrystore.autofilling.md +11 -0
- package/docs/api/foundation-auth.authformentrystore.md +3 -0
- package/docs/api/foundation-auth.authformentrystore.onselectedidpchanged.md +22 -0
- package/docs/api/foundation-auth.authformentrystore.onssotogglechanged.md +22 -0
- package/docs/api/foundation-auth.authrouting.md +1 -1
- package/docs/api/foundation-auth.configure.md +30 -9
- package/docs/api/foundation-auth.defaultauthformentrystore.autofill.md +15 -0
- package/docs/api/foundation-auth.defaultauthformentrystore.autofilling.md +11 -0
- package/docs/api/foundation-auth.defaultauthformentrystore.fetchmachine.md +11 -0
- package/docs/api/foundation-auth.defaultauthformentrystore.md +12 -0
- package/docs/api/foundation-auth.defaultauthformentrystore.onselectedidpchanged.md +11 -0
- package/docs/api/foundation-auth.defaultauthformentrystore.onssotogglechanged.md +11 -0
- package/docs/api/foundation-auth.defaultauthformentrystore.resetidpstate.md +15 -0
- package/docs/api/foundation-auth.defaultauthformentrystore.ssotoggledchanged.md +23 -0
- package/docs/api/foundation-auth.foundationauth.md +21 -0
- package/docs/api/foundation-auth.getauthrouting.md +1 -1
- package/docs/api/foundation-auth.md +3 -8
- package/docs/api/foundation-auth.settings.md +0 -5
- package/docs/api/foundation-auth.styles.md +2 -14
- package/docs/api/foundation-auth.template.md +1 -1
- package/docs/api/foundation-auth.zeroauth.md +45 -0
- package/docs/api-report.md +77 -188
- package/package.json +26 -12
- package/dist/dts/components/components.d.ts +0 -5
- package/dist/dts/components/components.d.ts.map +0 -1
- package/dist/dts/components/index.d.ts +0 -2
- package/dist/dts/components/index.d.ts.map +0 -1
- package/dist/dts/main/config.d.ts.map +0 -1
- package/dist/dts/main/define.d.ts +0 -29
- package/dist/dts/main/define.d.ts.map +0 -1
- package/dist/dts/main/main.definition.d.ts +0 -48
- package/dist/dts/main/main.definition.d.ts.map +0 -1
- package/dist/esm/components/components.js +0 -48
- package/dist/esm/components/index.js +0 -1
- package/dist/esm/main/define.js +0 -30
- package/dist/esm/main/main.definition.js +0 -43
- package/docs/api/foundation-auth.auth.md +0 -14
- package/docs/api/foundation-auth.authhosted.md +0 -23
- package/docs/api/foundation-auth.authhosted.registercommoncomponents.md +0 -18
- package/docs/api/foundation-auth.defaulttemplateoptions.md +0 -16
- package/docs/api/foundation-auth.define.md +0 -38
- package/docs/api/foundation-auth.definition.md +0 -19
- package/docs/api/foundation-auth.templatecomponents.md +0 -25
- package/docs/api/foundation-auth.templateoptions.md +0 -19
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Constructable } from '@microsoft/fast-element';
|
|
2
2
|
import { Container } from '@microsoft/fast-foundation';
|
|
3
3
|
import { RouterConfiguration } from '@microsoft/fast-router';
|
|
4
|
-
import { AuthConfig } from '../
|
|
4
|
+
import { AuthConfig } from '../config/config';
|
|
5
5
|
import { User } from '../user';
|
|
6
6
|
import type { Settings } from './types';
|
|
7
7
|
/**
|
|
@@ -9,7 +9,7 @@ import type { Settings } from './types';
|
|
|
9
9
|
*
|
|
10
10
|
* @internal
|
|
11
11
|
*/
|
|
12
|
-
export declare class
|
|
12
|
+
export declare class AuthRouterConfig extends RouterConfiguration<Settings> {
|
|
13
13
|
private user;
|
|
14
14
|
private container;
|
|
15
15
|
private authConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/routes/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAA2B,mBAAmB,EAAS,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/routes/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAA2B,mBAAmB,EAAS,MAAM,wBAAwB,CAAC;AAC7F,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC;;;;GAIG;AACH,qBAAa,gBAAiB,SAAQ,mBAAmB,CAAC,QAAQ,CAAC;IAEzD,OAAO,CAAC,IAAI;IACP,OAAO,CAAC,SAAS;IAChB,OAAO,CAAC,UAAU;gBAFhB,IAAI,EAAE,IAAI,EACL,SAAS,EAAE,SAAS,EACnB,UAAU,EAAE,UAAU;IAK5C,SAAS;IA2IT,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC;CAGxC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forgot-password.d.ts","sourceRoot":"","sources":["../../../../src/routes/forgot-password/forgot-password.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGpC,qBAKa,cAAe,SAAQ,SAAS;
|
|
1
|
+
{"version":3,"file":"forgot-password.d.ts","sourceRoot":"","sources":["../../../../src/routes/forgot-password/forgot-password.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGpC,qBAKa,cAAe,SAAQ,SAAS;IAC3C,iBAAiB;IAIX,QAAQ;CAUf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forgot-password.template.d.ts","sourceRoot":"","sources":["../../../../src/routes/forgot-password/forgot-password.template.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"forgot-password.template.d.ts","sourceRoot":"","sources":["../../../../src/routes/forgot-password/forgot-password.template.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,eAAO,MAAM,sBAAsB,qEAoBlC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/routes/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/routes/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
+
import { CredentialManager } from '../../credential';
|
|
1
2
|
import { LoginParams } from '../../machine';
|
|
3
|
+
import { User } from '../../user';
|
|
2
4
|
import { BaseRoute } from '../base';
|
|
3
|
-
import { IDP } from '../types';
|
|
4
5
|
export declare class Login extends BaseRoute {
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
user: User;
|
|
7
|
+
credentialManager: CredentialManager;
|
|
7
8
|
connectedCallback(): void;
|
|
8
|
-
enter(): void;
|
|
9
9
|
private attemptBasicLogin;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
onClickSSO(): void;
|
|
10
|
+
get ssoToggleLabel(): string;
|
|
11
|
+
onSSOLogin(): void;
|
|
13
12
|
onLoginSubmit(): Promise<void>;
|
|
14
13
|
login(params: LoginParams): void;
|
|
15
14
|
logout(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../../src/routes/login/login.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../../src/routes/login/login.ts"],"names":[],"mappings":"AAEA,OAAO,EAAoB,iBAAiB,EAAkB,MAAM,kBAAkB,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIpC,qBAKa,KAAM,SAAQ,SAAS;IAC5B,IAAI,EAAE,IAAI,CAAC;IACE,iBAAiB,EAAE,iBAAiB,CAAC;IAExD,iBAAiB;IAcjB,OAAO,CAAC,iBAAiB;IAezB,IACI,cAAc,WAIjB;IAED,UAAU;IAmBJ,aAAa;IAMnB,KAAK,CAAC,MAAM,EAAE,WAAW;IAIzB,MAAM;IAIN,IAAI,cAAc,YAEjB;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.styles.d.ts","sourceRoot":"","sources":["../../../../src/routes/login/login.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"login.styles.d.ts","sourceRoot":"","sources":["../../../../src/routes/login/login.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,iDAqEvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.template.d.ts","sourceRoot":"","sources":["../../../../src/routes/login/login.template.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"login.template.d.ts","sourceRoot":"","sources":["../../../../src/routes/login/login.template.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AA8GrC,eAAO,MAAM,aAAa,4DAmCzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../../../src/routes/logout/logout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIpC,qBAKa,MAAO,SAAQ,SAAS;IACnC,
|
|
1
|
+
{"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../../../src/routes/logout/logout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIpC,qBAKa,MAAO,SAAQ,SAAS;IACnC,iBAAiB;IAKjB,MAAM;CAGP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logout.template.d.ts","sourceRoot":"","sources":["../../../../src/routes/logout/logout.template.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logout.template.d.ts","sourceRoot":"","sources":["../../../../src/routes/logout/logout.template.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,eAAO,MAAM,cAAc,6DAW1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protected.template.d.ts","sourceRoot":"","sources":["../../../../src/routes/protected/protected.template.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"protected.template.d.ts","sourceRoot":"","sources":["../../../../src/routes/protected/protected.template.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,eAAO,MAAM,iBAAiB,gEAiB7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-account.template.d.ts","sourceRoot":"","sources":["../../../../src/routes/request-account/request-account.template.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"request-account.template.d.ts","sourceRoot":"","sources":["../../../../src/routes/request-account/request-account.template.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,eAAO,MAAM,sBAAsB,qEA6BlC,CAAC"}
|
|
@@ -4,7 +4,8 @@ import type { Settings } from '../types';
|
|
|
4
4
|
export declare class ResetPassword extends BaseRoute {
|
|
5
5
|
hasPasswordExpired: boolean;
|
|
6
6
|
passwordResetToken: string;
|
|
7
|
-
|
|
7
|
+
connectedCallback(): void;
|
|
8
|
+
enter(phase: NavigationPhase<Settings>): void;
|
|
8
9
|
onSubmit(): Promise<void>;
|
|
9
10
|
get headingText(): "Change Password" | "You are required to change your password";
|
|
10
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reset-password.d.ts","sourceRoot":"","sources":["../../../../src/routes/reset-password/reset-password.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGzC,qBAKa,aAAc,SAAQ,SAAS;IAC9B,kBAAkB,EAAE,OAAO,CAAS;IACpC,kBAAkB,EAAE,MAAM,CAAM;
|
|
1
|
+
{"version":3,"file":"reset-password.d.ts","sourceRoot":"","sources":["../../../../src/routes/reset-password/reset-password.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGzC,qBAKa,aAAc,SAAQ,SAAS;IAC9B,kBAAkB,EAAE,OAAO,CAAS;IACpC,kBAAkB,EAAE,MAAM,CAAM;IAE5C,iBAAiB;IAKjB,KAAK,CAAC,KAAK,EAAE,eAAe,CAAC,QAAQ,CAAC;IAKhC,QAAQ;IAiBd,IACI,WAAW,mEAEd;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reset-password.template.d.ts","sourceRoot":"","sources":["../../../../src/routes/reset-password/reset-password.template.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reset-password.template.d.ts","sourceRoot":"","sources":["../../../../src/routes/reset-password/reset-password.template.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,eAAO,MAAM,qBAAqB,oEA2BjC,CAAC"}
|
|
@@ -8,7 +8,7 @@ import { getRoutePath, navigateTo } from './utils';
|
|
|
8
8
|
*
|
|
9
9
|
* @example Import the utility into any component or logic you wish to invoke from.
|
|
10
10
|
* ```ts
|
|
11
|
-
* import { AuthRouting } from '@genesislcap/foundation-auth';
|
|
11
|
+
* import { AuthRouting } from '@genesislcap/foundation-auth/routing';
|
|
12
12
|
* ...
|
|
13
13
|
* @AuthRouting private authRouting: AuthRouting;
|
|
14
14
|
* ...
|
|
@@ -53,7 +53,7 @@ export declare const AuthRouting: import("@microsoft/fast-foundation").Interface
|
|
|
53
53
|
*
|
|
54
54
|
* @example
|
|
55
55
|
* ```ts
|
|
56
|
-
* import { getAuthRouting } from '@genesislcap/foundation-auth';
|
|
56
|
+
* import { getAuthRouting } from '@genesislcap/foundation-auth/routing';
|
|
57
57
|
* ...
|
|
58
58
|
* private authRouting = getAuthRouting();
|
|
59
59
|
* ...
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Defines the parameters you may set on the routes.
|
|
3
|
-
*
|
|
4
|
-
* @remarks
|
|
5
|
-
* See the example in the {@link Auth} class in the router's `configure` method for usage. All parameters are Optional.
|
|
6
|
-
*
|
|
7
3
|
* @public
|
|
8
4
|
*/
|
|
9
5
|
export type Settings = {
|
|
@@ -12,20 +8,6 @@ export type Settings = {
|
|
|
12
8
|
*/
|
|
13
9
|
public?: boolean;
|
|
14
10
|
};
|
|
15
|
-
/**
|
|
16
|
-
* @public
|
|
17
|
-
*/
|
|
18
|
-
export interface IDP {
|
|
19
|
-
id: string;
|
|
20
|
-
type: string;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* @public
|
|
24
|
-
*/
|
|
25
|
-
export interface IDPResponse {
|
|
26
|
-
ID: string;
|
|
27
|
-
TYPE: string;
|
|
28
|
-
}
|
|
29
11
|
/**
|
|
30
12
|
* @public
|
|
31
13
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/routes/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/routes/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;;CASb,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify.template.d.ts","sourceRoot":"","sources":["../../../../src/routes/verify/verify.template.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"verify.template.d.ts","sourceRoot":"","sources":["../../../../src/routes/verify/verify.template.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,eAAO,MAAM,cAAc,6DA8B1B,CAAC"}
|
package/dist/dts/store/auth.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CustomEventMap } from '@genesislcap/foundation-events';
|
|
2
2
|
import { AbstractStoreRoot, StoreRoot, StoreRootEventDetailMap } from '@genesislcap/foundation-store';
|
|
3
|
+
import { AuthConfig } from '../config/config';
|
|
3
4
|
import type { AuthMachineEventMap, ChangePasswordParams, ForgotPasswordParams, LoginParams, ResetPasswordParams } from '../machine';
|
|
4
5
|
import { AuthMachine } from '../machine';
|
|
5
|
-
import { AuthConfig } from '../main';
|
|
6
6
|
import { AuthFormEntryStore } from './authFormEntry';
|
|
7
7
|
/**
|
|
8
8
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/store/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EACL,iBAAiB,EAEjB,SAAS,EACT,uBAAuB,EACxB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,WAAW,EACX,mBAAmB,EACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/store/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EACL,iBAAiB,EAEjB,SAAS,EACT,uBAAuB,EACxB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EACV,mBAAmB,EAC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AAI,CAAC;CAChE;AAED;;;GAGG;AACH,qBAAa,gBACX,SAAQ,iBAAiB,CAAC,SAAS,EAAE,YAAY,EAAE,oBAAoB,CACvE,YAAW,SAAS;IAGN,QAAQ,CAAC,MAAM,EAAE,UAAU;IAC1B,QAAQ,CAAC,WAAW,EAAE,WAAW;IAC1B,QAAQ,CAAC,SAAS,EAAE,kBAAkB;gBAFrC,MAAM,EAAE,UAAU,EACjB,WAAW,EAAE,WAAW,EACjB,SAAS,EAAE,kBAAkB;IAK5D,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED,cAAc,gBAGZ;IAEF,OAAO,gBAKL;IAEF,QAAQ,gBAAuF;IAE/F,gBAAgB,gBAKd;IAEF,gBAAgB,gBAKd;IAEF,eAAe,gBAKb;CACH;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,gGAA+C,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { CustomEventMap } from '@genesislcap/foundation-events';
|
|
2
|
+
import { FetchMachine } from '@genesislcap/foundation-state-machine';
|
|
2
3
|
import { AbstractStore, Store } from '@genesislcap/foundation-store';
|
|
4
|
+
import { AuthConfig } from '../config/config';
|
|
3
5
|
import { CredentialManager } from '../credential';
|
|
4
|
-
import {
|
|
5
|
-
import { IDP } from '../routes';
|
|
6
|
+
import { IDP } from '../utils';
|
|
6
7
|
/**
|
|
7
8
|
* @public
|
|
8
9
|
*/
|
|
@@ -14,12 +15,18 @@ export type AuthFormEntryEventMap = {
|
|
|
14
15
|
'auth-password-changed': string;
|
|
15
16
|
'auth-password2-changed': string;
|
|
16
17
|
'auth-showPasswords-changed': boolean;
|
|
18
|
+
'auth-selectedIDP-changed': string;
|
|
19
|
+
'auth-ssoToggled-changed': boolean;
|
|
17
20
|
};
|
|
18
21
|
declare global {
|
|
19
22
|
interface HTMLElementEventMap extends CustomEventMap<AuthFormEntryEventMap> {
|
|
20
23
|
}
|
|
21
24
|
}
|
|
22
|
-
type InternalEventMap = {
|
|
25
|
+
type InternalEventMap = {
|
|
26
|
+
'auth-fetch-idps': void;
|
|
27
|
+
'auth-fetch-idps-success': IDP[];
|
|
28
|
+
'auth-fetch-idps-error': Error;
|
|
29
|
+
};
|
|
23
30
|
/**
|
|
24
31
|
* AuthFormEntryStore interface.
|
|
25
32
|
* @public
|
|
@@ -42,12 +49,15 @@ export interface AuthFormEntryStore extends Store {
|
|
|
42
49
|
readonly selectedIDP: string;
|
|
43
50
|
readonly ssoToggled: boolean;
|
|
44
51
|
readonly termsAgreed: boolean;
|
|
52
|
+
readonly autofilling: boolean;
|
|
45
53
|
onOrganisationChanged(event: CustomEvent<string>): void;
|
|
46
54
|
onUsernameChanged(event: CustomEvent<string>): void;
|
|
47
55
|
onEmailChanged(event: CustomEvent<string>): void;
|
|
48
56
|
onPasswordChanged(event: CustomEvent<string>): void;
|
|
49
57
|
onPassword2Changed(event: CustomEvent<string>): void;
|
|
50
58
|
onShowPasswordsChanged(event: CustomEvent<boolean>): void;
|
|
59
|
+
onSelectedIDPChanged(event: CustomEvent<string>): void;
|
|
60
|
+
onSSOToggleChanged(event: CustomEvent<boolean>): void;
|
|
51
61
|
onAutofillForm(event: CustomEvent<void>): void;
|
|
52
62
|
}
|
|
53
63
|
/**
|
|
@@ -57,6 +67,7 @@ export interface AuthFormEntryStore extends Store {
|
|
|
57
67
|
export declare class DefaultAuthFormEntryStore extends AbstractStore<AuthFormEntryStore, AuthFormEntryEventMap, InternalEventMap> implements AuthFormEntryStore {
|
|
58
68
|
protected config: AuthConfig;
|
|
59
69
|
protected credentialManager: CredentialManager;
|
|
70
|
+
readonly fetchMachine: FetchMachine;
|
|
60
71
|
host: string;
|
|
61
72
|
organisation: string;
|
|
62
73
|
username: string;
|
|
@@ -73,16 +84,21 @@ export declare class DefaultAuthFormEntryStore extends AbstractStore<AuthFormEnt
|
|
|
73
84
|
selectedIDP: string;
|
|
74
85
|
ssoToggled: boolean;
|
|
75
86
|
termsAgreed: boolean;
|
|
87
|
+
autofilling: boolean;
|
|
76
88
|
get orgUsername(): string;
|
|
77
89
|
constructor();
|
|
78
|
-
|
|
90
|
+
protected resetIDPState(): void;
|
|
91
|
+
protected autofill(): Promise<boolean>;
|
|
92
|
+
onAutofillForm: EventListener;
|
|
79
93
|
onOrganisationChanged: EventListener;
|
|
80
94
|
onUsernameChanged: EventListener;
|
|
81
95
|
onEmailChanged: EventListener;
|
|
82
96
|
onPasswordChanged: EventListener;
|
|
83
97
|
onPassword2Changed: EventListener;
|
|
84
98
|
onShowPasswordsChanged: EventListener;
|
|
85
|
-
|
|
99
|
+
onSelectedIDPChanged: EventListener;
|
|
100
|
+
onSSOToggleChanged: EventListener;
|
|
101
|
+
protected ssoToggledChanged(prev: boolean, next: boolean): void;
|
|
86
102
|
}
|
|
87
103
|
/**
|
|
88
104
|
* DI key of the store.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authFormEntry.d.ts","sourceRoot":"","sources":["../../../src/store/authFormEntry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAiB,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAEpF,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"authFormEntry.d.ts","sourceRoot":"","sources":["../../../src/store/authFormEntry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAiB,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAEpF,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAuB,MAAM,eAAe,CAAC;AACvE,OAAO,EAAa,GAAG,EAAU,MAAM,UAAU,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,oBAAoB,EAAE,IAAI,C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MAAM,CAAM;IACvB,aAAa,EAAE,OAAO,CAAS;IAC/B,kBAAkB,EAAE,OAAO,CAAS;IACpC,kBAAkB,EAAE,MAAM,CAAM;IAChC,OAAO,EAAE,MAAM,CAAM;IACrB,SAAS,EAAE,OAAO,CAAS;IAC3B,OAAO,EAAE,MAAM,CAAM;IACrB,IAAI,EAAE,GAAG,EAAE,CAAM;IACjB,WAAW,EAAE,MAAM,CAAM;IACzB,UAAU,EAAE,OAAO,CAAS;IAC5B,WAAW,UAAS;IAEpB,WAAW,UAAS;IAEhC,IACI,WAAW,IAAI,MAAM,CAIxB;;IAeD,SAAS,CAAC,aAAa;cAKP,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC;IA4C5C,cAAc,gBAAoE;IAElF,qBAAqB,gBAGnB;IAEF,iBAAiB,gBAGf;IAEF,cAAc,gBAGZ;IAEF,iBAAiB,gBAGf;IAEF,kBAAkB,gBAGhB;IAEF,sBAAsB,gBAGpB;IAEF,oBAAoB,gBAGlB;IAEF,kBAAkB,gBAGhB;IAEF,SAAS,CAAC,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO;CAsBzD;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,gGAAiE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/styles/styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/styles/styles.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,eAAO,MAAM,YAAY,iDAyHxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tags/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { TemplateComponents } from '../config/templates';
|
|
2
|
+
/**
|
|
3
|
+
* It's important this file isn't referenced ahead of a `configure` call, otherwise these values may remain fixed at
|
|
4
|
+
* their defaults. Consumers must use the `/config` subpath to help avoid this. Files with references to tags should be
|
|
5
|
+
* lazily loaded. There is an alternative `getTags` utility at the end which could offer another approach, but direct
|
|
6
|
+
* tag exports and inline template references feel cleaner than having to convert all component `template` and `styles`
|
|
7
|
+
* exports to functions to call `getTags` on execution.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare const templateOptions: import("../config/templates").TemplateOptions;
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export declare const anchorTag: string;
|
|
17
|
+
/**
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
export declare const buttonTag: string;
|
|
21
|
+
/**
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
export declare const cardTag: string;
|
|
25
|
+
/**
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
export declare const checkboxTag: string;
|
|
29
|
+
/**
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
export declare const listboxOptionTag: string;
|
|
33
|
+
/**
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
export declare const providerTag: string;
|
|
37
|
+
/**
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
export declare const routerTag: string;
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
export declare const selectTag: string;
|
|
45
|
+
/**
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
export declare const textFieldTag: string;
|
|
49
|
+
/**
|
|
50
|
+
* @internal
|
|
51
|
+
*/
|
|
52
|
+
export declare const progressRingTag: string;
|
|
53
|
+
/**
|
|
54
|
+
* @privateRemarks
|
|
55
|
+
* An alternative pattern under test.
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
|
+
export declare function getTags(): Record<keyof TemplateComponents, string>;
|
|
59
|
+
//# sourceMappingURL=tags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tags.d.ts","sourceRoot":"","sources":["../../../src/tags/tags.ts"],"names":[],"mappings":"AAGA,OAAO,EAA0B,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEjF;;;;;;GAMG;AAEH;;GAEG;AACH,eAAO,MAAQ,eAAe,+CACgB,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,SAAS,QAAiC,CAAC;AAExD;;GAEG;AACH,eAAO,MAAM,SAAS,QAAiC,CAAC;AAExD;;GAEG;AACH,eAAO,MAAM,OAAO,QAA+B,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,WAAW,QAAmC,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAAwC,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,WAAW,QAAmC,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,SAAS,QAAiC,CAAC;AAExD;;GAEG;AACH,eAAO,MAAM,SAAS,QAAiC,CAAC;AAExD;;GAEG;AACH,eAAO,MAAM,YAAY,QAAoC,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,eAAe,QAAuC,CAAC;AAEpE;;;;GAIG;AACH,wBAAgB,OAAO,IAAI,MAAM,CAAC,MAAM,kBAAkB,EAAE,MAAM,CAAC,CAelE"}
|
package/dist/dts/utils/sso.d.ts
CHANGED
|
@@ -1,10 +1,23 @@
|
|
|
1
|
-
import type { IDP } from '../routes/types';
|
|
2
1
|
/**
|
|
3
2
|
* Get SSO identity provider login URL
|
|
4
3
|
*
|
|
5
4
|
* @public
|
|
6
5
|
*/
|
|
7
6
|
export declare const getSSOLoginURL: (idp: any, path?: string, host?: string) => string;
|
|
7
|
+
/**
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export interface IDP {
|
|
11
|
+
id: string;
|
|
12
|
+
type: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
export interface IDPResponse {
|
|
18
|
+
ID: string;
|
|
19
|
+
TYPE: string;
|
|
20
|
+
}
|
|
8
21
|
/**
|
|
9
22
|
* Request SSO identity provider list
|
|
10
23
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sso.d.ts","sourceRoot":"","sources":["../../../src/utils/sso.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sso.d.ts","sourceRoot":"","sources":["../../../src/utils/sso.ts"],"names":[],"mappings":"AAkBA;;;;GAIG;AACH,eAAO,MAAM,cAAc,oDAK1B,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS,oCAA+C,QAAQ,GAAG,EAAE,CAkBjF,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
2
|
+
import { ResourceType } from '@genesislcap/foundation-utils';
|
|
3
|
+
import { logger } from '../utils';
|
|
4
|
+
/**
|
|
5
|
+
* zeroDesignSystemImport.
|
|
6
|
+
* @remarks
|
|
7
|
+
* Attempts to use a module federation version of zero before falling back to the version that was bundled with the app.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
function zeroDesignSystemImport() {
|
|
11
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12
|
+
let type = ResourceType.remote;
|
|
13
|
+
try {
|
|
14
|
+
return yield import(
|
|
15
|
+
/* webpackChunkName: "foundation-zero" */
|
|
16
|
+
'foundationZero/ZeroDesignSystem');
|
|
17
|
+
}
|
|
18
|
+
catch (e) {
|
|
19
|
+
logger.info(`Please note remoteEntry.js load errors are expected if module federated dependencies are offline. Falling back to locally bundled versions.`);
|
|
20
|
+
type = ResourceType.local;
|
|
21
|
+
return yield import(
|
|
22
|
+
/* webpackChunkName: "foundation-zero" */
|
|
23
|
+
'@genesislcap/foundation-zero');
|
|
24
|
+
}
|
|
25
|
+
finally {
|
|
26
|
+
logger.debug(`Using '${type}' version of foundation-zero`);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* registerCommonZeroComponents.
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
export const registerCommonZeroComponents = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
35
|
+
const { provideDesignSystem, zeroAnchor, zeroButton, zeroCard, zeroCheckbox, zeroDesignSystemProvider, zeroListboxOption, zeroProgressRing, zeroSelect, zeroTextField, } = yield zeroDesignSystemImport();
|
|
36
|
+
/**
|
|
37
|
+
* Register the components the app is using with the system.
|
|
38
|
+
*/
|
|
39
|
+
provideDesignSystem().register(
|
|
40
|
+
/**
|
|
41
|
+
* Design system provider element used to declaratively apply zero config to every dom node in the host tree.
|
|
42
|
+
*/
|
|
43
|
+
zeroDesignSystemProvider(),
|
|
44
|
+
/**
|
|
45
|
+
* Common across most routes, so batch register these lightweight components upfront.
|
|
46
|
+
*/
|
|
47
|
+
zeroAnchor(), zeroButton(), zeroCard(), zeroCheckbox(), zeroListboxOption(), zeroProgressRing(), zeroSelect(), zeroTextField());
|
|
48
|
+
});
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { css } from '@microsoft/fast-element';
|
|
2
|
-
import { DI
|
|
2
|
+
import { DI } from '@microsoft/fast-foundation';
|
|
3
3
|
import defaultBackgroundSrc from '../assets/bg.jpg';
|
|
4
4
|
import defaultLogoSrc from '../assets/genesis-logo-light.svg';
|
|
5
5
|
import { getRoutePath, navigateTo } from '../routes/utils';
|
|
6
|
+
import { defaultTemplateOptions } from './templates';
|
|
6
7
|
/**
|
|
7
8
|
* Default AuthConfig DI implementation.
|
|
8
9
|
* @public
|
|
9
10
|
*/
|
|
10
11
|
export const defaultAuthConfig = {
|
|
12
|
+
name: 'foundation-auth',
|
|
13
|
+
templateOptions: defaultTemplateOptions,
|
|
11
14
|
logo: css `
|
|
12
15
|
content: url(${defaultLogoSrc});
|
|
13
16
|
`,
|
|
@@ -50,42 +53,3 @@ export const defaultAuthConfig = {
|
|
|
50
53
|
* Marked as internal to stop api-extractor becoming confused cross-linking tokens with the same name.
|
|
51
54
|
*/
|
|
52
55
|
export const AuthConfig = DI.createInterface((x) => x.instance(defaultAuthConfig));
|
|
53
|
-
/**
|
|
54
|
-
* Configure the auth micro frontend settings.
|
|
55
|
-
*
|
|
56
|
-
* @remarks
|
|
57
|
-
* This is primarily for general settings, rather than re-defining the element, static templating / style changes.
|
|
58
|
-
*
|
|
59
|
-
* @param config - A partial AuthConfig.
|
|
60
|
-
*
|
|
61
|
-
* @example Configuring auth on lazy load
|
|
62
|
-
* ```ts
|
|
63
|
-
* title: 'Authenticate',
|
|
64
|
-
* name: 'auth',
|
|
65
|
-
* path: 'auth',
|
|
66
|
-
* element: async () => {
|
|
67
|
-
* const { configure, Auth } = await import('@genesislcap/foundation-auth');
|
|
68
|
-
* configure({
|
|
69
|
-
* hostPath: 'auth',
|
|
70
|
-
* omitRoutes: ['request-account'],
|
|
71
|
-
* logo: myCompanyLogo,
|
|
72
|
-
* background: myAuthBG,
|
|
73
|
-
* postLoginRedirect: () => {
|
|
74
|
-
* // You could inspect the user here and route them based on various conditions.
|
|
75
|
-
* Route.path.push('dashboard');
|
|
76
|
-
* },
|
|
77
|
-
* });
|
|
78
|
-
* return Auth;
|
|
79
|
-
* },
|
|
80
|
-
* layout: authLayout,
|
|
81
|
-
* settings: { public: true },
|
|
82
|
-
* childRouters: true,
|
|
83
|
-
* ```
|
|
84
|
-
*
|
|
85
|
-
* @public
|
|
86
|
-
* @privateRemarks
|
|
87
|
-
* We can tailor the spreading logic after we put it to use. Keeping it simple for now.
|
|
88
|
-
*/
|
|
89
|
-
export function configure(config) {
|
|
90
|
-
DI.getOrCreateDOMContainer().register(Registration.instance(AuthConfig, Object.assign(Object.assign({}, defaultAuthConfig), config)));
|
|
91
|
-
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
2
|
+
import { FASTElement } from '@microsoft/fast-element';
|
|
3
|
+
import { DI, Registration } from '@microsoft/fast-foundation';
|
|
4
|
+
import { AuthConfig, defaultAuthConfig } from './config';
|
|
5
|
+
/**
|
|
6
|
+
* configure.
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* Configure the auth micro frontend for host app integration.
|
|
10
|
+
*
|
|
11
|
+
* @example General foundation-auth configuration when the route is visited, ie. lazy loading.
|
|
12
|
+
* ```ts
|
|
13
|
+
* title: 'Authenticate',
|
|
14
|
+
* name: 'auth',
|
|
15
|
+
* path: 'auth',
|
|
16
|
+
* element: async () => {
|
|
17
|
+
* const { configure } = await import('@genesislcap/foundation-auth/config'); // < import from the subpath
|
|
18
|
+
* return configure({
|
|
19
|
+
* hostPath: 'auth',
|
|
20
|
+
* omitRoutes: ['request-account'],
|
|
21
|
+
* logo: myCompanyLogo,
|
|
22
|
+
* background: myAuthBG,
|
|
23
|
+
* postLoginRedirect: () => {
|
|
24
|
+
* // You could inspect the user here and route them based on various conditions.
|
|
25
|
+
* Route.path.push('dashboard');
|
|
26
|
+
* },
|
|
27
|
+
* });
|
|
28
|
+
* },
|
|
29
|
+
* layout: authLayout,
|
|
30
|
+
* settings: { public: true },
|
|
31
|
+
* childRouters: true,
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @example Providing template options align to your host application.
|
|
35
|
+
* ```ts
|
|
36
|
+
* title: 'Authenticate',
|
|
37
|
+
* name: 'auth',
|
|
38
|
+
* path: 'auth',
|
|
39
|
+
* element: async () => {
|
|
40
|
+
* const { configure } = await import('@genesislcap/foundation-auth/config'); // < import from the subpath
|
|
41
|
+
* return configure({
|
|
42
|
+
* name: `nexus-app-auth`,
|
|
43
|
+
* // These will be merged with the packages `defaultTemplateOptions`. You will need to have these components registered in your application.
|
|
44
|
+
* templateOptions: {
|
|
45
|
+
* button: 'nexus-button',
|
|
46
|
+
* checkbox: 'nexus-checkbox-next',
|
|
47
|
+
* provider: 'template',
|
|
48
|
+
* },
|
|
49
|
+
* });
|
|
50
|
+
* },
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* @param config - A partial AuthConfig.
|
|
54
|
+
* @public
|
|
55
|
+
*/
|
|
56
|
+
export function configure(config) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
/**
|
|
59
|
+
* Merge the configs
|
|
60
|
+
*/
|
|
61
|
+
const value = Object.assign(Object.assign({}, defaultAuthConfig), config);
|
|
62
|
+
if (config.templateOptions) {
|
|
63
|
+
value.templateOptions = Object.assign(Object.assign({}, defaultAuthConfig.templateOptions), config.templateOptions);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Register a new AuthConfig
|
|
67
|
+
*/
|
|
68
|
+
DI.getOrCreateDOMContainer().register(Registration.instance(AuthConfig, value));
|
|
69
|
+
/**
|
|
70
|
+
* Lazily reference and define the micro frontend element post config setting.
|
|
71
|
+
*/
|
|
72
|
+
const { FoundationAuth, template, styles } = yield import('../main');
|
|
73
|
+
const { name, attributes, shadowOptions, elementOptions } = value;
|
|
74
|
+
return FASTElement.define(FoundationAuth, {
|
|
75
|
+
name,
|
|
76
|
+
template,
|
|
77
|
+
styles,
|
|
78
|
+
attributes,
|
|
79
|
+
shadowOptions,
|
|
80
|
+
elementOptions,
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
}
|