@genesislcap/foundation-auth 14.103.0-auth-mf.24 → 14.103.0-auth-mf.26
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 +18 -8
- package/dist/dts/config/config.d.ts +0 -4
- package/dist/dts/config/config.d.ts.map +1 -1
- package/dist/dts/main/main.d.ts +6 -7
- package/dist/dts/main/main.d.ts.map +1 -1
- package/dist/dts/routes/base.d.ts +8 -2
- package/dist/dts/routes/base.d.ts.map +1 -1
- package/dist/dts/routes/config.d.ts +3 -1
- package/dist/dts/routes/config.d.ts.map +1 -1
- package/dist/dts/routes/login/login.d.ts +0 -2
- package/dist/dts/routes/login/login.d.ts.map +1 -1
- package/dist/dts/routes/routing.d.ts +12 -5
- package/dist/dts/routes/routing.d.ts.map +1 -1
- package/dist/dts/routes/utils.d.ts.map +1 -1
- package/dist/dts/user/user.d.ts +3 -0
- package/dist/dts/user/user.d.ts.map +1 -1
- package/dist/esm/config/config.js +10 -4
- package/dist/esm/routes/base.js +4 -0
- package/dist/esm/routes/config.js +39 -39
- package/dist/esm/routes/forgot-password/forgot-password.js +1 -1
- package/dist/esm/routes/login/login.js +3 -8
- package/dist/esm/routes/routing.js +12 -4
- package/dist/esm/routes/utils.js +6 -0
- package/dist/esm/user/user.js +5 -0
- package/dist/foundation-auth.api.json +59 -27
- package/dist/foundation-auth.d.ts +16 -14
- package/docs/api/foundation-auth.authconfig.md +0 -1
- package/docs/api/foundation-auth.defaultuser.cleartrackinghistory.md +16 -0
- package/docs/api/foundation-auth.defaultuser.md +1 -0
- package/docs/api/foundation-auth.user.cleartrackinghistory.md +15 -0
- package/docs/api/foundation-auth.user.md +1 -0
- package/docs/api-report.md +9 -4
- package/package.json +12 -12
- package/docs/api/foundation-auth.authconfig.forgotpasswordreturnurl.md +0 -13
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ not limited to:
|
|
|
19
19
|
* `AuthMessageMapper`: The auth message dto to entity [mapper](./src/mapper/README.md).
|
|
20
20
|
* `AuthRouting`: A routing utility, which you can call `navigateTo(...)` to navigate to internal routes.
|
|
21
21
|
* `SOCKET_URL`: The full socket url environment variable to connect with, ie. `wss://public-foundation-hardened1/gwf/`.
|
|
22
|
-
* Various UI components / route screens, which are lazy loaded on-demand to optimise the experience.
|
|
22
|
+
* Various UI components / route screens, some of which are lazy loaded on-demand to optimise the experience.
|
|
23
23
|
|
|
24
24
|
Many of these are available as [subpath exports](https://nodejs.org/api/packages.html#subpath-exports) and should be
|
|
25
25
|
imported from these to optimise bundling and overall efficiency.
|
|
@@ -198,22 +198,32 @@ private authRouting = getAuthRouting();
|
|
|
198
198
|
this.authRouting.navigateTo('logout');
|
|
199
199
|
```
|
|
200
200
|
|
|
201
|
-
You can use `AuthRouting` to navigate to other routes, like change password etc
|
|
201
|
+
You can use `AuthRouting` to navigate to other routes, like change password etc., without needing to know the full
|
|
202
202
|
path the micro frontend is hosted on.
|
|
203
203
|
|
|
204
|
-
If you have trouble logging out using the routing utility, you can try using your host app's router directly.
|
|
205
|
-
|
|
204
|
+
If you have trouble logging out using the routing utility, you can try using your host app's router directly.
|
|
205
|
+
|
|
206
|
+
The following example is Angular based, where the developer has put the micro frontend on the `auth` path. There's logic
|
|
207
|
+
within the micro frontend that will automatically navigate itself to the logout route if the login screen is loaded
|
|
208
|
+
while the user is already logged in. Logging out is as easy as moving back to that route.
|
|
206
209
|
|
|
207
210
|
```ts
|
|
208
211
|
import { Router } from '@angular/router';
|
|
209
|
-
import { getAuthRouting } from '@genesislcap/foundation-auth/routing';
|
|
210
212
|
|
|
211
213
|
export class AppComponent {
|
|
212
214
|
constructor(private router: Router) {}
|
|
213
|
-
|
|
215
|
+
/**
|
|
216
|
+
* Note the developer has put the micro frontend of the `auth` path.
|
|
217
|
+
*/
|
|
214
218
|
onLogout() {
|
|
215
|
-
|
|
216
|
-
|
|
219
|
+
/**
|
|
220
|
+
* Navigate back to the micro frontend and it will take care of the logout.
|
|
221
|
+
*/
|
|
222
|
+
this.router.navigateByUrl('auth');
|
|
223
|
+
/**
|
|
224
|
+
* Alternatively, you can navigate to the internal logout route.
|
|
225
|
+
* this.router.navigateByUrl('auth/logout');
|
|
226
|
+
*/
|
|
217
227
|
}
|
|
218
228
|
}
|
|
219
229
|
```
|
|
@@ -140,10 +140,6 @@ export interface AuthConfig extends PartialFASTElementDefinition {
|
|
|
140
140
|
* Used to help resolve internal route links. Defaults to an empty string.
|
|
141
141
|
*/
|
|
142
142
|
hostPath: string;
|
|
143
|
-
/**
|
|
144
|
-
* The forgot password return URL which is used in the email template.
|
|
145
|
-
*/
|
|
146
|
-
forgotPasswordReturnUrl: string;
|
|
147
143
|
/**
|
|
148
144
|
* Omit certain return URLs which the session service may have captured.
|
|
149
145
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,gBAAgB,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,gBAAgB,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAK9F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,OAAO,EAA0B,eAAe,EAAE,MAAM,aAAa,CAAC;AAEtE;;GAEG;AAEH;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,cAA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;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,UAwC/B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,kEAAuE,CAAC"}
|
package/dist/dts/main/main.d.ts
CHANGED
|
@@ -18,9 +18,7 @@ declare const FoundationAuth_base: abstract new (...args: any[]) => {
|
|
|
18
18
|
inert: boolean;
|
|
19
19
|
innerText: string;
|
|
20
20
|
lang: string;
|
|
21
|
-
readonly offsetHeight: number;
|
|
22
|
-
* @internal
|
|
23
|
-
*/
|
|
21
|
+
readonly offsetHeight: number;
|
|
24
22
|
readonly offsetLeft: number;
|
|
25
23
|
readonly offsetParent: Element;
|
|
26
24
|
readonly offsetTop: number;
|
|
@@ -50,12 +48,12 @@ declare const FoundationAuth_base: abstract new (...args: any[]) => {
|
|
|
50
48
|
outerHTML: string;
|
|
51
49
|
readonly ownerDocument: Document;
|
|
52
50
|
readonly part: DOMTokenList;
|
|
53
|
-
readonly prefix: string;
|
|
54
|
-
readonly scrollHeight: number;
|
|
55
|
-
scrollLeft: number;
|
|
56
|
-
scrollTop: number; /**
|
|
51
|
+
readonly prefix: string; /**
|
|
57
52
|
* @internal
|
|
58
53
|
*/
|
|
54
|
+
readonly scrollHeight: number;
|
|
55
|
+
scrollLeft: number;
|
|
56
|
+
scrollTop: number;
|
|
59
57
|
readonly scrollWidth: number;
|
|
60
58
|
readonly shadowRoot: ShadowRoot;
|
|
61
59
|
slot: string;
|
|
@@ -344,6 +342,7 @@ export declare class FoundationAuth extends FoundationAuth_base {
|
|
|
344
342
|
*/
|
|
345
343
|
store: AuthStore;
|
|
346
344
|
/**
|
|
345
|
+
* It's important this stays named config as it is what the fast-router looks up in chain, which is subpar.
|
|
347
346
|
* @internal
|
|
348
347
|
*/
|
|
349
348
|
config: AuthRouterConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/main/main.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,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mBAAmC;IACrE;;OAEG;IACQ,KAAK,EAAE,SAAS,CAAC;IAE5B;;;OAGG;IACuB,MAAM,EAAE,gBAAgB,CAAC;IAEnD;;OAEG;IACQ,SAAS,EAAE,SAAS,CAAC;IAEhC;;OAEG;IACH,SAAS,CAAC,cAAc,EAAE,eAAe,CAAC;IAE1C;;OAEG;IACH,iBAAiB;IAQjB;;OAEG;IACH,oBAAoB;IAMpB;;OAEG;IACH,SAAS,CAAC,sBAAsB;IAIhC;;OAEG;IACH,SAAS,CAAC,WAAW;IAWrB;;OAEG;IACH,SAAS,CAAC,cAAc;IAIxB;;OAEG;IACH,SAAS,CAAC,iBAAiB;IAI3B;;OAEG;IACH,SAAS,CAAC,oBAAoB;IAI9B;;OAEG;IACH,SAAS,CAAC,UAAU;IAKpB;;OAEG;IACH,IAAI,OAAO,YAKV;IAED;;OAEG;IACH,IACI,UAAU,WAEb;IAED;;OAEG;IACH,eAAe,IAAI,IAAI;CAMxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,qBAKa,QAAS,SAAQ,cAAc;IAC1C;;OAEG;IACS,SAAS,EAAE,OAAO,CAAS;IAEvC;;OAEG;IACG,iBAAiB;IAKvB;;OAEG;cACa,WAAW;IAM3B;;;;OAIG;IACH,IAAI,OAAO,YAEV;CACF"}
|
|
@@ -2,6 +2,7 @@ import { Binding } from '@microsoft/fast-element';
|
|
|
2
2
|
import { Container } from '@microsoft/fast-foundation';
|
|
3
3
|
import { AuthConfig } from '../config/config';
|
|
4
4
|
import { AuthEventMap, AuthFormEntryEventMap, AuthStore } from '../store';
|
|
5
|
+
import { User } from '../user';
|
|
5
6
|
import { AuthRouting } from './routing';
|
|
6
7
|
/**
|
|
7
8
|
* @internal
|
|
@@ -102,8 +103,12 @@ declare const ConfigHostElement_base: abstract new (...args: any[]) => {
|
|
|
102
103
|
removeAttributeNode(attr: Attr): Attr;
|
|
103
104
|
requestFullscreen(options?: FullscreenOptions): Promise<void>;
|
|
104
105
|
requestPointerLock(): void;
|
|
105
|
-
scroll(options?: ScrollToOptions): void;
|
|
106
|
-
|
|
106
|
+
scroll(options?: ScrollToOptions): void; /**
|
|
107
|
+
* If there's a background video we'll need to ensure there's no image set on the background that blocks it.
|
|
108
|
+
*/
|
|
109
|
+
scroll(x: number, y: number): void; /**
|
|
110
|
+
* If there's a background video we'll need to ensure there's no image set on the background that blocks it.
|
|
111
|
+
*/
|
|
107
112
|
scrollBy(options?: ScrollToOptions): void;
|
|
108
113
|
scrollBy(x: number, y: number): void;
|
|
109
114
|
scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
|
|
@@ -351,6 +356,7 @@ export declare class ConfigHostElement extends ConfigHostElement_base implements
|
|
|
351
356
|
* @internal
|
|
352
357
|
*/
|
|
353
358
|
export declare class BaseRoute extends ConfigHostElement {
|
|
359
|
+
user: User;
|
|
354
360
|
store: AuthStore;
|
|
355
361
|
routing: AuthRouting;
|
|
356
362
|
onBack: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/routes/base.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,OAAO,EAQR,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAqB,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1E,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC;;GAEG;AACH,KAAK,QAAQ,GAAG,YAAY,GAAG,qBAAqB,GAAG,EAAE,CAAC;AAE1D;;GAEG;AACH,eAAO,MAAM,SAAS,wLAAiC,CAAC;AAExD;;GAEG;AACH,eAAO,MAAM,UAAU,wLAAkC,CAAC;AAE1D;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,EAAE,UAAU,C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B;CAMlB;AAED;;GAEG;AACH,qBAAa,SAAU,SAAQ,iBAAiB;IACxC,IAAI,EAAE,IAAI,CAAC;IACN,KAAK,EAAE,SAAS,CAAC;IACf,OAAO,EAAE,WAAW,CAAC;IAElC,MAAM,aAAsC;CAC7C;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,mFAsB7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,mFAiBzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,mFAkBtB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,gCAAiC,MAAM,2DAahE,CAAC;AAOF;;GAEG;AACH,eAAO,MAAM,cAAc,8BAA+B,KAAK,GAAG,cAAc,2DAgB/E,CAAC;AA0GF;;GAEG;AACH,eAAO,MAAM,UAAU,kCAAmC,OAAO,2DAUhE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,gCAChB,MAAM,eACD,MAAM,aACR,OAAO,2DAWlB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,mFASjC,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { Container } from '@microsoft/fast-foundation';
|
|
|
3
3
|
import { RouterConfiguration } from '@microsoft/fast-router';
|
|
4
4
|
import { AuthConfig } from '../config/config';
|
|
5
5
|
import { User } from '../user';
|
|
6
|
+
import { AuthRouting } from './routing';
|
|
6
7
|
import type { Settings } from './types';
|
|
7
8
|
/**
|
|
8
9
|
* Base implementation of a routing used with the Auth class
|
|
@@ -13,7 +14,8 @@ export declare class AuthRouterConfig extends RouterConfiguration<Settings> {
|
|
|
13
14
|
private user;
|
|
14
15
|
private container;
|
|
15
16
|
private authConfig;
|
|
16
|
-
|
|
17
|
+
private authRouting;
|
|
18
|
+
constructor(user: User, container: Container, authConfig: AuthConfig, authRouting: AuthRouting);
|
|
17
19
|
configure(): void;
|
|
18
20
|
construct<T>(Type: Constructable<T>): T;
|
|
19
21
|
}
|
|
@@ -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;AAC7F,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,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;AAQ/B,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAIxC;;;;GAIG;AACH,qBAAa,gBAAiB,SAAQ,mBAAmB,CAAC,QAAQ,CAAC;IAEzD,OAAO,CAAC,IAAI;IACP,OAAO,CAAC,SAAS;IAChB,OAAO,CAAC,UAAU;IACjB,OAAO,CAAC,WAAW;gBAHlB,IAAI,EAAE,IAAI,EACL,SAAS,EAAE,SAAS,EACnB,UAAU,EAAE,UAAU,EACrB,WAAW,EAAE,WAAW;IAK/C,SAAS;IAgIT,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC;CAGxC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { CredentialManager } from '../../credential';
|
|
2
2
|
import { LoginParams } from '../../machine/types';
|
|
3
|
-
import { User } from '../../user';
|
|
4
3
|
import { BaseRoute } from '../base';
|
|
5
4
|
export declare class Login extends BaseRoute {
|
|
6
|
-
user: User;
|
|
7
5
|
credentialManager: CredentialManager;
|
|
8
6
|
connectedCallback(): void;
|
|
9
7
|
private attemptBasicLogin;
|
|
@@ -1 +1 @@
|
|
|
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,qBAAqB,CAAC;
|
|
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,qBAAqB,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIpC,qBAKa,KAAM,SAAQ,SAAS;IACf,iBAAiB,EAAE,iBAAiB,CAAC;IAExD,iBAAiB;IAYjB,OAAO,CAAC,iBAAiB;IAezB,IACI,cAAc,WAIjB;IAED,UAAU;IAmBJ,aAAa;IAInB,KAAK,CAAC,MAAM,EAAE,WAAW;IAIzB,MAAM;IAIN,IAAI,cAAc,YAEjB;CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AuthRoutes } from './types';
|
|
2
|
-
import { getRoutePath, navigateTo } from './utils';
|
|
2
|
+
import { getRoutePath, isMFRoute, navigateTo } from './utils';
|
|
3
3
|
/**
|
|
4
4
|
* AuthRouting interface.
|
|
5
5
|
*
|
|
@@ -18,10 +18,13 @@ import { getRoutePath, navigateTo } from './utils';
|
|
|
18
18
|
* @public
|
|
19
19
|
*/
|
|
20
20
|
export interface AuthRouting {
|
|
21
|
-
/** {@inheritDoc navigateTo} */
|
|
22
|
-
navigateTo: typeof navigateTo;
|
|
23
21
|
/** {@inheritDoc getRoutePath} */
|
|
24
22
|
getRoutePath: typeof getRoutePath;
|
|
23
|
+
/** {@inheritDoc isMFRoute} */
|
|
24
|
+
isMFRoute: typeof isMFRoute;
|
|
25
|
+
/** {@inheritDoc navigateTo} */
|
|
26
|
+
navigateTo: typeof navigateTo;
|
|
27
|
+
getForgotPasswordReturnUrl(): string;
|
|
25
28
|
}
|
|
26
29
|
/**
|
|
27
30
|
* Default AuthRouting.
|
|
@@ -31,10 +34,14 @@ export interface AuthRouting {
|
|
|
31
34
|
export declare class DefaultAuthRouting implements AuthRouting {
|
|
32
35
|
/** @internal */
|
|
33
36
|
private config;
|
|
34
|
-
/** {@inheritDoc AuthRouting.navigateTo} */
|
|
35
|
-
navigateTo(route: AuthRoutes | string): void;
|
|
36
37
|
/** {@inheritDoc AuthRouting.getRoutePath} */
|
|
37
38
|
getRoutePath(route: AuthRoutes | string): string;
|
|
39
|
+
/** {@inheritDoc AuthRouting.isMFRoute} */
|
|
40
|
+
isMFRoute(pathname?: string): boolean;
|
|
41
|
+
/** {@inheritDoc AuthRouting.navigateTo} */
|
|
42
|
+
navigateTo(route: AuthRoutes | string): void;
|
|
43
|
+
/** {@inheritDoc AuthRouting.getForgotPasswordReturnUrl} */
|
|
44
|
+
getForgotPasswordReturnUrl(): string;
|
|
38
45
|
}
|
|
39
46
|
/**
|
|
40
47
|
* AuthRouting DI key.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../../../src/routes/routing.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../../../src/routes/routing.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAA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d.ts","sourceRoot":"","sources":["../../../src/routes/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,QAAQ,GAAE,MAA0B,GAAG,OAAO,CAKvE;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,QAEpD;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,EAAE,QAAQ,GAAE,MAAW,GAAG,MAAM,CAQtF"}
|
package/dist/dts/user/user.d.ts
CHANGED
|
@@ -135,6 +135,7 @@ export interface User extends UserPathHistory, UserActionHistory {
|
|
|
135
135
|
* @param listener - A listener function.
|
|
136
136
|
*/
|
|
137
137
|
addAuthenticationChangeListener(listener: Listener<UserAuthenticationChangeEvent>): () => void;
|
|
138
|
+
clearTrackingHistory(): void;
|
|
138
139
|
}
|
|
139
140
|
/**
|
|
140
141
|
* Default User implementation.
|
|
@@ -193,6 +194,8 @@ export declare class DefaultUser implements User {
|
|
|
193
194
|
clearActions(): void;
|
|
194
195
|
/** {@inheritDoc UserActionHistory.lastAction} */
|
|
195
196
|
lastAction(): unknown;
|
|
197
|
+
/** {@inheritDoc User.clearTrackingHistory} */
|
|
198
|
+
clearTrackingHistory(): void;
|
|
196
199
|
/** @internal */
|
|
197
200
|
protected hasKey(keys: string[], key: string | string[]): boolean;
|
|
198
201
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/user/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAGzE,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC;;;GAGG;AAC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gBAAgB;IAChB,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE;IAUvD,gBAAgB;IAChB,SAAS,CAAC,6BAA6B,kFAAmD;IAE1F,yDAAyD;IACzD,+BAA+B,CAAC,QAAQ,EAAE,QAAQ,CAAC,6BAA6B,CAAC;IAIjF,gBAAgB;IAChB,SAAS,CAAC,sBAAsB;CAOjC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,IAAI,4DAA4D,CAAC;AAE9E;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,OAAO,IAAI,IAAI,CAE9B"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { css } from '@microsoft/fast-element';
|
|
2
2
|
import { DI } from '@microsoft/fast-foundation';
|
|
3
|
+
import { Route } from '@microsoft/fast-router';
|
|
3
4
|
import defaultBackgroundSrc from '../assets/bg.jpg';
|
|
4
5
|
import defaultLogoSrc from '../assets/genesis-logo-light.svg';
|
|
5
|
-
import {
|
|
6
|
+
import { navigateTo } from '../routes/utils';
|
|
7
|
+
import { getUser } from '../user/user';
|
|
6
8
|
import { defaultTemplateOptions } from './templates';
|
|
7
9
|
/**
|
|
8
10
|
* Default AuthConfig DI implementation.
|
|
@@ -36,10 +38,14 @@ export const defaultAuthConfig = {
|
|
|
36
38
|
},
|
|
37
39
|
},
|
|
38
40
|
hostPath: '',
|
|
39
|
-
forgotPasswordReturnUrl: `${location.protocol}//${location.host}/${getRoutePath('reset-password')}`,
|
|
40
41
|
omitRedirectUrls: ['/not-found', '/not-permitted'],
|
|
41
|
-
postLoginRedirect: () => navigateTo('protected'),
|
|
42
|
-
postLogoutRedirect: () =>
|
|
42
|
+
postLoginRedirect: () => { var _a; return navigateTo((_a = getUser().lastPath()) !== null && _a !== void 0 ? _a : 'protected'); },
|
|
43
|
+
postLogoutRedirect: () => {
|
|
44
|
+
const currentRoute = Route.path.current;
|
|
45
|
+
if (currentRoute && currentRoute.includes('logout')) {
|
|
46
|
+
navigateTo('/');
|
|
47
|
+
}
|
|
48
|
+
},
|
|
43
49
|
sso: {
|
|
44
50
|
toggled: false,
|
|
45
51
|
},
|
package/dist/esm/routes/base.js
CHANGED
|
@@ -8,6 +8,7 @@ import { classNames } from '@microsoft/fast-web-utilities';
|
|
|
8
8
|
import { AuthConfig, defaultAuthConfig } from '../config/config';
|
|
9
9
|
import { AuthStore } from '../store';
|
|
10
10
|
import { buttonTag, checkboxTag, progressRingTag, textFieldTag } from '../tags';
|
|
11
|
+
import { User } from '../user';
|
|
11
12
|
import { AuthRouting } from './routing';
|
|
12
13
|
/**
|
|
13
14
|
* @internal
|
|
@@ -46,6 +47,9 @@ export class BaseRoute extends ConfigHostElement {
|
|
|
46
47
|
this.onBack = () => this.routing.navigateTo('/');
|
|
47
48
|
}
|
|
48
49
|
}
|
|
50
|
+
__decorate([
|
|
51
|
+
User
|
|
52
|
+
], BaseRoute.prototype, "user", void 0);
|
|
49
53
|
__decorate([
|
|
50
54
|
AuthStore
|
|
51
55
|
], BaseRoute.prototype, "store", void 0);
|
|
@@ -4,109 +4,101 @@ import { RouterConfiguration, Route } from '@microsoft/fast-router';
|
|
|
4
4
|
import { AuthConfig } from '../config/config';
|
|
5
5
|
import { defaultLayout } from '../layouts';
|
|
6
6
|
import { User } from '../user';
|
|
7
|
+
import { logger } from '../utils';
|
|
8
|
+
import { ForgotPassword } from './forgot-password/forgot-password';
|
|
7
9
|
import { Login } from './login/login';
|
|
10
|
+
import { Logout } from './logout/logout';
|
|
11
|
+
import { NotFound } from './not-found/not-found';
|
|
12
|
+
import { RequestAccount } from './request-account/request-account';
|
|
13
|
+
import { ResetPassword } from './reset-password/reset-password';
|
|
14
|
+
import { AuthRouting } from './routing';
|
|
15
|
+
import { Verify } from './verify/verify';
|
|
8
16
|
/**
|
|
9
17
|
* Base implementation of a routing used with the Auth class
|
|
10
18
|
*
|
|
11
19
|
* @internal
|
|
12
20
|
*/
|
|
13
21
|
let AuthRouterConfig = class AuthRouterConfig extends RouterConfiguration {
|
|
14
|
-
constructor(user, container, authConfig) {
|
|
22
|
+
constructor(user, container, authConfig, authRouting) {
|
|
15
23
|
super();
|
|
16
24
|
this.user = user;
|
|
17
25
|
this.container = container;
|
|
18
26
|
this.authConfig = authConfig;
|
|
27
|
+
this.authRouting = authRouting;
|
|
19
28
|
}
|
|
20
29
|
configure() {
|
|
21
30
|
this.title = 'Auth';
|
|
22
31
|
this.defaultLayout = defaultLayout;
|
|
32
|
+
const getRoutePath = (route) => this.parent ? route : this.authRouting.getRoutePath(route);
|
|
23
33
|
const routes = [
|
|
24
34
|
{
|
|
25
|
-
path: '',
|
|
35
|
+
path: getRoutePath(''),
|
|
26
36
|
name: 'login',
|
|
27
37
|
element: Login,
|
|
28
38
|
title: 'Login',
|
|
29
39
|
settings: { public: true },
|
|
30
40
|
},
|
|
31
41
|
{
|
|
32
|
-
path: 'logout',
|
|
42
|
+
path: getRoutePath('logout'),
|
|
33
43
|
name: 'logout',
|
|
34
|
-
element:
|
|
35
|
-
const { Logout } = yield import('./logout/logout');
|
|
36
|
-
return Logout;
|
|
37
|
-
}),
|
|
44
|
+
element: Logout,
|
|
38
45
|
title: 'Logging out, please wait...',
|
|
39
46
|
settings: { public: true },
|
|
40
47
|
},
|
|
41
48
|
{
|
|
42
|
-
path: 'not-found',
|
|
43
|
-
element: () => __awaiter(this, void 0, void 0, function* () {
|
|
44
|
-
const { NotFound } = yield import('./not-found/not-found');
|
|
45
|
-
return NotFound;
|
|
46
|
-
}),
|
|
47
|
-
title: 'Not Found',
|
|
49
|
+
path: getRoutePath('not-found'),
|
|
48
50
|
name: 'not-found',
|
|
51
|
+
element: NotFound,
|
|
52
|
+
title: 'Not Found',
|
|
49
53
|
settings: { public: true },
|
|
50
54
|
},
|
|
51
55
|
];
|
|
52
56
|
const { omitRoutes } = this.authConfig;
|
|
53
57
|
if (!omitRoutes.includes('request-account')) {
|
|
54
58
|
routes.push({
|
|
55
|
-
path: 'request-account',
|
|
59
|
+
path: getRoutePath('request-account'),
|
|
56
60
|
name: 'request-account',
|
|
57
|
-
element:
|
|
58
|
-
const { RequestAccount } = yield import('./request-account/request-account');
|
|
59
|
-
return RequestAccount;
|
|
60
|
-
}),
|
|
61
|
+
element: RequestAccount,
|
|
61
62
|
title: 'Request Account',
|
|
62
63
|
settings: { public: true },
|
|
63
64
|
});
|
|
64
65
|
}
|
|
65
66
|
if (!omitRoutes.includes('reset-password')) {
|
|
66
67
|
routes.push({
|
|
67
|
-
path: 'reset-password',
|
|
68
|
+
path: getRoutePath('reset-password'),
|
|
68
69
|
name: 'reset-password',
|
|
69
|
-
element:
|
|
70
|
-
const { ResetPassword } = yield import('./reset-password/reset-password');
|
|
71
|
-
return ResetPassword;
|
|
72
|
-
}),
|
|
70
|
+
element: ResetPassword,
|
|
73
71
|
title: 'Reset Password',
|
|
74
72
|
settings: { public: true },
|
|
75
73
|
});
|
|
76
74
|
}
|
|
77
75
|
if (!omitRoutes.includes('forgot-password')) {
|
|
78
76
|
routes.push({
|
|
79
|
-
path: 'forgot-password',
|
|
77
|
+
path: getRoutePath('forgot-password'),
|
|
80
78
|
name: 'forgot-password',
|
|
81
|
-
element:
|
|
82
|
-
const { ForgotPassword } = yield import('./forgot-password/forgot-password');
|
|
83
|
-
return ForgotPassword;
|
|
84
|
-
}),
|
|
79
|
+
element: ForgotPassword,
|
|
85
80
|
title: 'Forgot Password',
|
|
86
81
|
settings: { public: true },
|
|
87
82
|
});
|
|
88
83
|
}
|
|
89
84
|
if (!omitRoutes.includes('verify')) {
|
|
90
85
|
routes.push({
|
|
91
|
-
path: 'verify',
|
|
92
|
-
element: () => __awaiter(this, void 0, void 0, function* () {
|
|
93
|
-
const { Verify } = yield import('./verify/verify');
|
|
94
|
-
return Verify;
|
|
95
|
-
}),
|
|
96
|
-
title: 'Verify',
|
|
86
|
+
path: getRoutePath('verify'),
|
|
97
87
|
name: 'verify',
|
|
88
|
+
element: Verify,
|
|
89
|
+
title: 'Verify',
|
|
98
90
|
settings: { public: true },
|
|
99
91
|
});
|
|
100
92
|
}
|
|
101
93
|
if (!omitRoutes.includes('protected')) {
|
|
102
94
|
routes.push({
|
|
103
|
-
path: 'protected',
|
|
95
|
+
path: getRoutePath('protected'),
|
|
96
|
+
name: 'protected',
|
|
104
97
|
element: () => __awaiter(this, void 0, void 0, function* () {
|
|
105
98
|
const { Protected } = yield import('./protected/protected');
|
|
106
99
|
return Protected;
|
|
107
100
|
}),
|
|
108
101
|
title: 'Protected',
|
|
109
|
-
name: 'protected',
|
|
110
102
|
settings: { public: false },
|
|
111
103
|
});
|
|
112
104
|
}
|
|
@@ -114,7 +106,14 @@ let AuthRouterConfig = class AuthRouterConfig extends RouterConfiguration {
|
|
|
114
106
|
/**
|
|
115
107
|
* Example of a FallbackRouteDefinition
|
|
116
108
|
*/
|
|
117
|
-
this.routes.fallback(() =>
|
|
109
|
+
this.routes.fallback(() => {
|
|
110
|
+
this.user.trackPath();
|
|
111
|
+
const result = this.user.isAuthenticated
|
|
112
|
+
? { redirect: getRoutePath('not-found') }
|
|
113
|
+
: { redirect: getRoutePath('') };
|
|
114
|
+
logger.debug('AuthRouterConfig.routes.fallback. Falling back to:', result);
|
|
115
|
+
return result;
|
|
116
|
+
});
|
|
118
117
|
/**
|
|
119
118
|
* Example of a NavigationContributor
|
|
120
119
|
*/
|
|
@@ -138,7 +137,7 @@ let AuthRouterConfig = class AuthRouterConfig extends RouterConfiguration {
|
|
|
138
137
|
*/
|
|
139
138
|
phase.cancel(() => {
|
|
140
139
|
this.user.trackPath();
|
|
141
|
-
Route.name.replace(phase.router, '
|
|
140
|
+
Route.name.replace(phase.router, getRoutePath(''));
|
|
142
141
|
});
|
|
143
142
|
}),
|
|
144
143
|
});
|
|
@@ -150,6 +149,7 @@ let AuthRouterConfig = class AuthRouterConfig extends RouterConfiguration {
|
|
|
150
149
|
AuthRouterConfig = __decorate([
|
|
151
150
|
__param(0, User),
|
|
152
151
|
__param(1, Container),
|
|
153
|
-
__param(2, AuthConfig)
|
|
152
|
+
__param(2, AuthConfig),
|
|
153
|
+
__param(3, AuthRouting)
|
|
154
154
|
], AuthRouterConfig);
|
|
155
155
|
export { AuthRouterConfig };
|
|
@@ -13,7 +13,7 @@ let ForgotPassword = class ForgotPassword extends BaseRoute {
|
|
|
13
13
|
*/
|
|
14
14
|
this.$emit('auth-forgot-password', {
|
|
15
15
|
username: this.store.formEntry.orgUsername,
|
|
16
|
-
returnUrl: this.
|
|
16
|
+
returnUrl: this.routing.getForgotPasswordReturnUrl(),
|
|
17
17
|
});
|
|
18
18
|
});
|
|
19
19
|
}
|
|
@@ -2,7 +2,6 @@ import { __awaiter, __decorate } from "tslib";
|
|
|
2
2
|
import { inIFrame, inSymphonyDesktop, openPopup } from '@genesislcap/foundation-utils';
|
|
3
3
|
import { customElement, volatile } from '@microsoft/fast-element';
|
|
4
4
|
import { CredentialManager, CredentialType } from '../../credential';
|
|
5
|
-
import { User } from '../../user';
|
|
6
5
|
import { logger } from '../../utils';
|
|
7
6
|
import { BaseRoute } from '../base';
|
|
8
7
|
import { LoginStyles as styles } from './login.styles';
|
|
@@ -11,12 +10,11 @@ let Login = class Login extends BaseRoute {
|
|
|
11
10
|
connectedCallback() {
|
|
12
11
|
super.connectedCallback();
|
|
13
12
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* TODO: Remove pending investigation.
|
|
13
|
+
* This is the top-level mf route. If it connects while the user is logged in, we can assume the intention is to
|
|
14
|
+
* logout, and can navigate users to the logout route automatically to simplify host integrations.
|
|
17
15
|
*/
|
|
18
16
|
if (this.user.isAuthenticated) {
|
|
19
|
-
this.logout
|
|
17
|
+
this.routing.navigateTo('logout');
|
|
20
18
|
return;
|
|
21
19
|
}
|
|
22
20
|
}
|
|
@@ -73,9 +71,6 @@ let Login = class Login extends BaseRoute {
|
|
|
73
71
|
return this.store.authMachine.hasTag('pending');
|
|
74
72
|
}
|
|
75
73
|
};
|
|
76
|
-
__decorate([
|
|
77
|
-
User
|
|
78
|
-
], Login.prototype, "user", void 0);
|
|
79
74
|
__decorate([
|
|
80
75
|
CredentialManager
|
|
81
76
|
], Login.prototype, "credentialManager", void 0);
|
|
@@ -1,20 +1,28 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { DI } from '@microsoft/fast-foundation';
|
|
3
3
|
import { AuthConfig } from '../config/config';
|
|
4
|
-
import { getRoutePath, navigateTo } from './utils';
|
|
4
|
+
import { getRoutePath, isMFRoute, navigateTo } from './utils';
|
|
5
5
|
/**
|
|
6
6
|
* Default AuthRouting.
|
|
7
7
|
*
|
|
8
8
|
* @public
|
|
9
9
|
*/
|
|
10
10
|
export class DefaultAuthRouting {
|
|
11
|
+
/** {@inheritDoc AuthRouting.getRoutePath} */
|
|
12
|
+
getRoutePath(route) {
|
|
13
|
+
return getRoutePath(route, this.config.hostPath);
|
|
14
|
+
}
|
|
15
|
+
/** {@inheritDoc AuthRouting.isMFRoute} */
|
|
16
|
+
isMFRoute(pathname = location.pathname) {
|
|
17
|
+
return isMFRoute(pathname);
|
|
18
|
+
}
|
|
11
19
|
/** {@inheritDoc AuthRouting.navigateTo} */
|
|
12
20
|
navigateTo(route) {
|
|
13
21
|
navigateTo(this.getRoutePath(route));
|
|
14
22
|
}
|
|
15
|
-
/** {@inheritDoc AuthRouting.
|
|
16
|
-
|
|
17
|
-
return getRoutePath(
|
|
23
|
+
/** {@inheritDoc AuthRouting.getForgotPasswordReturnUrl} */
|
|
24
|
+
getForgotPasswordReturnUrl() {
|
|
25
|
+
return `${location.protocol}//${location.host}/${this.getRoutePath('reset-password')}`;
|
|
18
26
|
}
|
|
19
27
|
}
|
|
20
28
|
__decorate([
|
package/dist/esm/routes/utils.js
CHANGED
|
@@ -35,5 +35,11 @@ export function navigateTo(route) {
|
|
|
35
35
|
* @public
|
|
36
36
|
*/
|
|
37
37
|
export function getRoutePath(route, hostPath = '') {
|
|
38
|
+
if (route === '/') {
|
|
39
|
+
return route;
|
|
40
|
+
}
|
|
41
|
+
if (route === '') {
|
|
42
|
+
return hostPath ? hostPath : route;
|
|
43
|
+
}
|
|
38
44
|
return hostPath ? `${hostPath}/${route}` : route;
|
|
39
45
|
}
|
package/dist/esm/user/user.js
CHANGED
|
@@ -113,6 +113,11 @@ export class DefaultUser {
|
|
|
113
113
|
const length = this.actionHistory.length;
|
|
114
114
|
return length > 0 ? this.actionHistory[length - 1] : undefined;
|
|
115
115
|
}
|
|
116
|
+
/** {@inheritDoc User.clearTrackingHistory} */
|
|
117
|
+
clearTrackingHistory() {
|
|
118
|
+
this.clearPaths();
|
|
119
|
+
this.clearActions();
|
|
120
|
+
}
|
|
116
121
|
/** @internal */
|
|
117
122
|
hasKey(keys, key) {
|
|
118
123
|
if (!keys || !keys.length || !key) {
|
|
@@ -319,33 +319,6 @@
|
|
|
319
319
|
"endIndex": 2
|
|
320
320
|
}
|
|
321
321
|
},
|
|
322
|
-
{
|
|
323
|
-
"kind": "PropertySignature",
|
|
324
|
-
"canonicalReference": "@genesislcap/foundation-auth!AuthConfig#forgotPasswordReturnUrl:member",
|
|
325
|
-
"docComment": "/**\n * The forgot password return URL which is used in the email template.\n */\n",
|
|
326
|
-
"excerptTokens": [
|
|
327
|
-
{
|
|
328
|
-
"kind": "Content",
|
|
329
|
-
"text": "forgotPasswordReturnUrl: "
|
|
330
|
-
},
|
|
331
|
-
{
|
|
332
|
-
"kind": "Content",
|
|
333
|
-
"text": "string"
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
"kind": "Content",
|
|
337
|
-
"text": ";"
|
|
338
|
-
}
|
|
339
|
-
],
|
|
340
|
-
"isReadonly": false,
|
|
341
|
-
"isOptional": false,
|
|
342
|
-
"releaseTag": "Public",
|
|
343
|
-
"name": "forgotPasswordReturnUrl",
|
|
344
|
-
"propertyTypeTokenRange": {
|
|
345
|
-
"startIndex": 1,
|
|
346
|
-
"endIndex": 2
|
|
347
|
-
}
|
|
348
|
-
},
|
|
349
322
|
{
|
|
350
323
|
"kind": "PropertySignature",
|
|
351
324
|
"canonicalReference": "@genesislcap/foundation-auth!AuthConfig#hostPath:member",
|
|
@@ -8421,6 +8394,37 @@
|
|
|
8421
8394
|
"isAbstract": false,
|
|
8422
8395
|
"name": "clearPaths"
|
|
8423
8396
|
},
|
|
8397
|
+
{
|
|
8398
|
+
"kind": "Method",
|
|
8399
|
+
"canonicalReference": "@genesislcap/foundation-auth!DefaultUser#clearTrackingHistory:member(1)",
|
|
8400
|
+
"docComment": "/**\n * {@inheritDoc User.clearTrackingHistory}\n */\n",
|
|
8401
|
+
"excerptTokens": [
|
|
8402
|
+
{
|
|
8403
|
+
"kind": "Content",
|
|
8404
|
+
"text": "clearTrackingHistory(): "
|
|
8405
|
+
},
|
|
8406
|
+
{
|
|
8407
|
+
"kind": "Content",
|
|
8408
|
+
"text": "void"
|
|
8409
|
+
},
|
|
8410
|
+
{
|
|
8411
|
+
"kind": "Content",
|
|
8412
|
+
"text": ";"
|
|
8413
|
+
}
|
|
8414
|
+
],
|
|
8415
|
+
"isStatic": false,
|
|
8416
|
+
"returnTypeTokenRange": {
|
|
8417
|
+
"startIndex": 1,
|
|
8418
|
+
"endIndex": 2
|
|
8419
|
+
},
|
|
8420
|
+
"releaseTag": "Public",
|
|
8421
|
+
"isProtected": false,
|
|
8422
|
+
"overloadIndex": 1,
|
|
8423
|
+
"parameters": [],
|
|
8424
|
+
"isOptional": false,
|
|
8425
|
+
"isAbstract": false,
|
|
8426
|
+
"name": "clearTrackingHistory"
|
|
8427
|
+
},
|
|
8424
8428
|
{
|
|
8425
8429
|
"kind": "Property",
|
|
8426
8430
|
"canonicalReference": "@genesislcap/foundation-auth!DefaultUser#details:member",
|
|
@@ -14363,6 +14367,34 @@
|
|
|
14363
14367
|
],
|
|
14364
14368
|
"name": "addAuthenticationChangeListener"
|
|
14365
14369
|
},
|
|
14370
|
+
{
|
|
14371
|
+
"kind": "MethodSignature",
|
|
14372
|
+
"canonicalReference": "@genesislcap/foundation-auth!User#clearTrackingHistory:member(1)",
|
|
14373
|
+
"docComment": "",
|
|
14374
|
+
"excerptTokens": [
|
|
14375
|
+
{
|
|
14376
|
+
"kind": "Content",
|
|
14377
|
+
"text": "clearTrackingHistory(): "
|
|
14378
|
+
},
|
|
14379
|
+
{
|
|
14380
|
+
"kind": "Content",
|
|
14381
|
+
"text": "void"
|
|
14382
|
+
},
|
|
14383
|
+
{
|
|
14384
|
+
"kind": "Content",
|
|
14385
|
+
"text": ";"
|
|
14386
|
+
}
|
|
14387
|
+
],
|
|
14388
|
+
"isOptional": false,
|
|
14389
|
+
"returnTypeTokenRange": {
|
|
14390
|
+
"startIndex": 1,
|
|
14391
|
+
"endIndex": 2
|
|
14392
|
+
},
|
|
14393
|
+
"releaseTag": "Public",
|
|
14394
|
+
"overloadIndex": 1,
|
|
14395
|
+
"parameters": [],
|
|
14396
|
+
"name": "clearTrackingHistory"
|
|
14397
|
+
},
|
|
14366
14398
|
{
|
|
14367
14399
|
"kind": "PropertySignature",
|
|
14368
14400
|
"canonicalReference": "@genesislcap/foundation-auth!User#details:member",
|
|
@@ -141,10 +141,6 @@ export declare interface AuthConfig extends PartialFASTElementDefinition {
|
|
|
141
141
|
* Used to help resolve internal route links. Defaults to an empty string.
|
|
142
142
|
*/
|
|
143
143
|
hostPath: string;
|
|
144
|
-
/**
|
|
145
|
-
* The forgot password return URL which is used in the email template.
|
|
146
|
-
*/
|
|
147
|
-
forgotPasswordReturnUrl: string;
|
|
148
144
|
/**
|
|
149
145
|
* Omit certain return URLs which the session service may have captured.
|
|
150
146
|
*
|
|
@@ -412,7 +408,8 @@ export declare class AuthRouterConfig extends RouterConfiguration<Settings> {
|
|
|
412
408
|
private user;
|
|
413
409
|
private container;
|
|
414
410
|
private authConfig;
|
|
415
|
-
|
|
411
|
+
private authRouting;
|
|
412
|
+
constructor(user: User, container: Container, authConfig: AuthConfig, authRouting: AuthRouting);
|
|
416
413
|
configure(): void;
|
|
417
414
|
construct<T>(Type: Constructable<T>): T;
|
|
418
415
|
}
|
|
@@ -454,10 +451,13 @@ export declare type AuthRoutes = (typeof AuthRoutes)[keyof typeof AuthRoutes];
|
|
|
454
451
|
* @public
|
|
455
452
|
*/
|
|
456
453
|
declare interface AuthRouting {
|
|
457
|
-
/** {@inheritDoc navigateTo} */
|
|
458
|
-
navigateTo: typeof navigateTo;
|
|
459
454
|
/** {@inheritDoc getRoutePath} */
|
|
460
455
|
getRoutePath: typeof getRoutePath;
|
|
456
|
+
/** {@inheritDoc isMFRoute} */
|
|
457
|
+
isMFRoute: typeof isMFRoute;
|
|
458
|
+
/** {@inheritDoc navigateTo} */
|
|
459
|
+
navigateTo: typeof navigateTo;
|
|
460
|
+
getForgotPasswordReturnUrl(): string;
|
|
461
461
|
}
|
|
462
462
|
|
|
463
463
|
/**
|
|
@@ -1140,6 +1140,8 @@ export declare class DefaultUser implements User {
|
|
|
1140
1140
|
clearActions(): void;
|
|
1141
1141
|
/** {@inheritDoc UserActionHistory.lastAction} */
|
|
1142
1142
|
lastAction(): unknown;
|
|
1143
|
+
/** {@inheritDoc User.clearTrackingHistory} */
|
|
1144
|
+
clearTrackingHistory(): void;
|
|
1143
1145
|
/** @internal */
|
|
1144
1146
|
protected hasKey(keys: string[], key: string | string[]): boolean;
|
|
1145
1147
|
/** @internal */
|
|
@@ -1375,6 +1377,7 @@ export declare class FoundationAuth extends FoundationAuth_base {
|
|
|
1375
1377
|
*/
|
|
1376
1378
|
store: AuthStore;
|
|
1377
1379
|
/**
|
|
1380
|
+
* It's important this stays named config as it is what the fast-router looks up in chain, which is subpar.
|
|
1378
1381
|
* @internal
|
|
1379
1382
|
*/
|
|
1380
1383
|
config: AuthRouterConfig;
|
|
@@ -1443,9 +1446,7 @@ declare const FoundationAuth_base: abstract new (...args: any[]) => {
|
|
|
1443
1446
|
inert: boolean;
|
|
1444
1447
|
innerText: string;
|
|
1445
1448
|
lang: string;
|
|
1446
|
-
readonly offsetHeight: number;
|
|
1447
|
-
* @internal
|
|
1448
|
-
*/
|
|
1449
|
+
readonly offsetHeight: number;
|
|
1449
1450
|
readonly offsetLeft: number;
|
|
1450
1451
|
readonly offsetParent: Element;
|
|
1451
1452
|
readonly offsetTop: number;
|
|
@@ -1475,12 +1476,12 @@ declare const FoundationAuth_base: abstract new (...args: any[]) => {
|
|
|
1475
1476
|
outerHTML: string;
|
|
1476
1477
|
readonly ownerDocument: Document;
|
|
1477
1478
|
readonly part: DOMTokenList;
|
|
1478
|
-
readonly prefix: string;
|
|
1479
|
-
readonly scrollHeight: number;
|
|
1480
|
-
scrollLeft: number;
|
|
1481
|
-
scrollTop: number; /**
|
|
1479
|
+
readonly prefix: string; /**
|
|
1482
1480
|
* @internal
|
|
1483
1481
|
*/
|
|
1482
|
+
readonly scrollHeight: number;
|
|
1483
|
+
scrollLeft: number;
|
|
1484
|
+
scrollTop: number;
|
|
1484
1485
|
readonly scrollWidth: number;
|
|
1485
1486
|
readonly shadowRoot: ShadowRoot;
|
|
1486
1487
|
slot: string;
|
|
@@ -2613,6 +2614,7 @@ export declare interface User extends UserPathHistory, UserActionHistory {
|
|
|
2613
2614
|
* @param listener - A listener function.
|
|
2614
2615
|
*/
|
|
2615
2616
|
addAuthenticationChangeListener(listener: Listener<UserAuthenticationChangeEvent>): () => void;
|
|
2617
|
+
clearTrackingHistory(): void;
|
|
2616
2618
|
}
|
|
2617
2619
|
|
|
2618
2620
|
/**
|
|
@@ -21,7 +21,6 @@ export interface AuthConfig extends PartialFASTElementDefinition
|
|
|
21
21
|
| [backgroundVideo](./foundation-auth.authconfig.backgroundvideo.md) | | { src: string; type: 'video/ogg' \| 'video/mp4' \| 'video/webm'; } \| null | Background video. |
|
|
22
22
|
| [feedbackDelay?](./foundation-auth.authconfig.feedbackdelay.md) | | number | _(Optional)_ Feedback delay. |
|
|
23
23
|
| [fields](./foundation-auth.authconfig.fields.md) | | [FieldConfigMap](./foundation-auth.fieldconfigmap.md) | Map of configuration for each of the primary form fields. |
|
|
24
|
-
| [forgotPasswordReturnUrl](./foundation-auth.authconfig.forgotpasswordreturnurl.md) | | string | The forgot password return URL which is used in the email template. |
|
|
25
24
|
| [hostPath](./foundation-auth.authconfig.hostpath.md) | | string | The <code>path</code> of the micro frontend as defined in the parent / host route. |
|
|
26
25
|
| [logo](./foundation-auth.authconfig.logo.md) | | ComposableStyles \| ComposableStyles\[\] \| null | Logo styles. |
|
|
27
26
|
| [omitRedirectUrls](./foundation-auth.authconfig.omitredirecturls.md) | | string\[\] | Omit certain return URLs which the session service may have captured. |
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-auth](./foundation-auth.md) > [DefaultUser](./foundation-auth.defaultuser.md) > [clearTrackingHistory](./foundation-auth.defaultuser.cleartrackinghistory.md)
|
|
4
|
+
|
|
5
|
+
## DefaultUser.clearTrackingHistory() method
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
**Signature:**
|
|
9
|
+
|
|
10
|
+
```typescript
|
|
11
|
+
clearTrackingHistory(): void;
|
|
12
|
+
```
|
|
13
|
+
**Returns:**
|
|
14
|
+
|
|
15
|
+
void
|
|
16
|
+
|
|
@@ -36,6 +36,7 @@ export declare class DefaultUser implements User
|
|
|
36
36
|
| [addAuthenticationChangeListener(listener)](./foundation-auth.defaultuser.addauthenticationchangelistener.md) | | |
|
|
37
37
|
| [clearActions()](./foundation-auth.defaultuser.clearactions.md) | | Clears action history. |
|
|
38
38
|
| [clearPaths()](./foundation-auth.defaultuser.clearpaths.md) | | Clears path history. |
|
|
39
|
+
| [clearTrackingHistory()](./foundation-auth.defaultuser.cleartrackinghistory.md) | | |
|
|
39
40
|
| [hasPermission(permission)](./foundation-auth.defaultuser.haspermission.md) | | |
|
|
40
41
|
| [hasProfile(profile)](./foundation-auth.defaultuser.hasprofile.md) | | |
|
|
41
42
|
| [isAdmin()](./foundation-auth.defaultuser.isadmin.md) | | |
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-auth](./foundation-auth.md) > [User](./foundation-auth.user.md) > [clearTrackingHistory](./foundation-auth.user.cleartrackinghistory.md)
|
|
4
|
+
|
|
5
|
+
## User.clearTrackingHistory() method
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
clearTrackingHistory(): void;
|
|
11
|
+
```
|
|
12
|
+
**Returns:**
|
|
13
|
+
|
|
14
|
+
void
|
|
15
|
+
|
|
@@ -45,6 +45,7 @@ import { User } from '@genesislcap/foundation-auth/user';
|
|
|
45
45
|
| Method | Description |
|
|
46
46
|
| --- | --- |
|
|
47
47
|
| [addAuthenticationChangeListener(listener)](./foundation-auth.user.addauthenticationchangelistener.md) | |
|
|
48
|
+
| [clearTrackingHistory()](./foundation-auth.user.cleartrackinghistory.md) | |
|
|
48
49
|
| [hasPermission(permission)](./foundation-auth.user.haspermission.md) | |
|
|
49
50
|
| [hasProfile(profile)](./foundation-auth.user.hasprofile.md) | |
|
|
50
51
|
| [isAdmin()](./foundation-auth.user.isadmin.md) | |
|
package/docs/api-report.md
CHANGED
|
@@ -69,7 +69,6 @@ export interface AuthConfig extends PartialFASTElementDefinition {
|
|
|
69
69
|
} | null;
|
|
70
70
|
feedbackDelay?: number;
|
|
71
71
|
fields: FieldConfigMap;
|
|
72
|
-
forgotPasswordReturnUrl: string;
|
|
73
72
|
hostPath: string;
|
|
74
73
|
logo: ComposableStyles | ComposableStyles[] | null;
|
|
75
74
|
omitRedirectUrls: string[];
|
|
@@ -244,7 +243,8 @@ export type AuthMessageMapperLookup = {
|
|
|
244
243
|
//
|
|
245
244
|
// @internal
|
|
246
245
|
export class AuthRouterConfig extends RouterConfiguration<Settings> {
|
|
247
|
-
|
|
246
|
+
// Warning: (ae-forgotten-export) The symbol "AuthRouting" needs to be exported by the entry point index.d.ts
|
|
247
|
+
constructor(user: User, container: Container, authConfig: AuthConfig, authRouting: AuthRouting);
|
|
248
248
|
// (undocumented)
|
|
249
249
|
configure(): void;
|
|
250
250
|
// (undocumented)
|
|
@@ -525,7 +525,6 @@ export class DefaultAuthFormEntryStore extends AbstractStore<AuthFormEntryStore,
|
|
|
525
525
|
|
|
526
526
|
// @public
|
|
527
527
|
export class DefaultAuthMachine extends AbstractMachine<AuthMachineContext, AuthMachineEvent> implements AuthMachine {
|
|
528
|
-
// Warning: (ae-forgotten-export) The symbol "AuthRouting" needs to be exported by the entry point index.d.ts
|
|
529
528
|
constructor(user: User, fetchMachine: FetchMachine, cm: CredentialManager, uuid: UUID, messageMapper: AuthMessageMapper, config: AuthConfig, routing: AuthRouting);
|
|
530
529
|
// (undocumented)
|
|
531
530
|
protected captureAuthQueryParams(): QueryParams;
|
|
@@ -713,6 +712,10 @@ export class DefaultUser implements User {
|
|
|
713
712
|
protected authenticationChangeListeners: Observer<UserAuthenticationChangeEvent>;
|
|
714
713
|
clearActions(): void;
|
|
715
714
|
clearPaths(): void;
|
|
715
|
+
// Warning: (ae-unresolved-inheritdoc-reference) The @inheritDoc reference could not be resolved: The reference is ambiguous because "User" has more than one declaration; you need to add a TSDoc member reference selector
|
|
716
|
+
//
|
|
717
|
+
// (undocumented)
|
|
718
|
+
clearTrackingHistory(): void;
|
|
716
719
|
// @internal (undocumented)
|
|
717
720
|
protected config: UserConfig;
|
|
718
721
|
// Warning: (ae-unresolved-inheritdoc-reference) The @inheritDoc reference could not be resolved: The reference is ambiguous because "User" has more than one declaration; you need to add a TSDoc member reference selector
|
|
@@ -962,7 +965,7 @@ export class FoundationAuth extends FoundationAuth_base {
|
|
|
962
965
|
attemptAutofill(): void;
|
|
963
966
|
// @internal (undocumented)
|
|
964
967
|
get classNames(): string;
|
|
965
|
-
// @internal
|
|
968
|
+
// @internal
|
|
966
969
|
config: AuthRouterConfig;
|
|
967
970
|
// @internal (undocumented)
|
|
968
971
|
connectedCallback(): void;
|
|
@@ -1463,6 +1466,8 @@ export interface User extends UserPathHistory, UserActionHistory {
|
|
|
1463
1466
|
// (undocumented)
|
|
1464
1467
|
addAuthenticationChangeListener(listener: Listener<UserAuthenticationChangeEvent>): () => void;
|
|
1465
1468
|
// (undocumented)
|
|
1469
|
+
clearTrackingHistory(): void;
|
|
1470
|
+
// (undocumented)
|
|
1466
1471
|
readonly details: Details;
|
|
1467
1472
|
// (undocumented)
|
|
1468
1473
|
hasPermission(permission: string | string[]): boolean;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-auth",
|
|
3
3
|
"description": "Genesis Foundation Auth",
|
|
4
|
-
"version": "14.103.0-auth-mf.
|
|
4
|
+
"version": "14.103.0-auth-mf.26",
|
|
5
5
|
"license": "SEE LICENSE IN license.txt",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
7
7
|
"types": "dist/foundation-auth.d.ts",
|
|
@@ -98,19 +98,19 @@
|
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
100
|
"devDependencies": {
|
|
101
|
-
"@genesislcap/foundation-testing": "14.103.0-auth-mf.
|
|
102
|
-
"@genesislcap/genx": "14.103.0-auth-mf.
|
|
101
|
+
"@genesislcap/foundation-testing": "14.103.0-auth-mf.26",
|
|
102
|
+
"@genesislcap/genx": "14.103.0-auth-mf.26",
|
|
103
103
|
"rimraf": "^3.0.2"
|
|
104
104
|
},
|
|
105
105
|
"dependencies": {
|
|
106
|
-
"@genesislcap/foundation-comms": "14.103.0-auth-mf.
|
|
107
|
-
"@genesislcap/foundation-events": "14.103.0-auth-mf.
|
|
108
|
-
"@genesislcap/foundation-logger": "14.103.0-auth-mf.
|
|
109
|
-
"@genesislcap/foundation-state-machine": "14.103.0-auth-mf.
|
|
110
|
-
"@genesislcap/foundation-store": "14.103.0-auth-mf.
|
|
111
|
-
"@genesislcap/foundation-ui": "14.103.0-auth-mf.
|
|
112
|
-
"@genesislcap/foundation-utils": "14.103.0-auth-mf.
|
|
113
|
-
"@genesislcap/foundation-zero": "14.103.0-auth-mf.
|
|
106
|
+
"@genesislcap/foundation-comms": "14.103.0-auth-mf.26",
|
|
107
|
+
"@genesislcap/foundation-events": "14.103.0-auth-mf.26",
|
|
108
|
+
"@genesislcap/foundation-logger": "14.103.0-auth-mf.26",
|
|
109
|
+
"@genesislcap/foundation-state-machine": "14.103.0-auth-mf.26",
|
|
110
|
+
"@genesislcap/foundation-store": "14.103.0-auth-mf.26",
|
|
111
|
+
"@genesislcap/foundation-ui": "14.103.0-auth-mf.26",
|
|
112
|
+
"@genesislcap/foundation-utils": "14.103.0-auth-mf.26",
|
|
113
|
+
"@genesislcap/foundation-zero": "14.103.0-auth-mf.26",
|
|
114
114
|
"@microsoft/fast-components": "^2.21.3",
|
|
115
115
|
"@microsoft/fast-element": "^1.7.0",
|
|
116
116
|
"@microsoft/fast-foundation": "^2.33.2",
|
|
@@ -130,5 +130,5 @@
|
|
|
130
130
|
"publishConfig": {
|
|
131
131
|
"access": "public"
|
|
132
132
|
},
|
|
133
|
-
"gitHead": "
|
|
133
|
+
"gitHead": "dad32cd82242af68918774e9559904ba1089eadc"
|
|
134
134
|
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-auth](./foundation-auth.md) > [AuthConfig](./foundation-auth.authconfig.md) > [forgotPasswordReturnUrl](./foundation-auth.authconfig.forgotpasswordreturnurl.md)
|
|
4
|
-
|
|
5
|
-
## AuthConfig.forgotPasswordReturnUrl property
|
|
6
|
-
|
|
7
|
-
The forgot password return URL which is used in the email template.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
forgotPasswordReturnUrl: string;
|
|
13
|
-
```
|