@genesislcap/foundation-login 14.226.0 → 14.226.2-alpha-bcda968.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dts/main/main.d.ts +1 -1
- package/dist/dts/routes/base.d.ts +1 -2
- package/dist/dts/routes/base.d.ts.map +1 -1
- package/dist/dts/routes/config.d.ts +4 -10
- package/dist/dts/routes/config.d.ts.map +1 -1
- package/dist/dts/routes/forgot-password/forgot-password.d.ts.map +1 -1
- package/dist/esm/main/main.js +1 -1
- package/dist/esm/routes/base.js +8 -9
- package/dist/esm/routes/config.js +16 -48
- package/dist/esm/routes/forgot-password/forgot-password.js +12 -5
- package/dist/esm/routes/login-form/login-form.js +4 -4
- package/dist/esm/routes/login-form/login-form.template.js +3 -3
- package/dist/esm/routes/protected/protected.js +1 -1
- package/dist/esm/routes/reset-password/reset-password.js +2 -2
- package/dist/esm/utils/sso.js +1 -1
- package/dist/foundation-login.api.json +50 -150
- package/dist/foundation-login.d.ts +5 -12
- package/docs/api/foundation-login.fetchidps.md +1 -13
- package/docs/api/foundation-login.getssologinurl.md +1 -14
- package/docs/api/foundation-login.login.md +1 -1
- package/docs/api/foundation-login.md +4 -4
- package/docs/api/foundation-login.styles.md +1 -11
- package/docs/api/foundation-login.template.md +1 -12
- package/docs/{api-report.md.api.md → api-report.md} +4 -10
- package/package.json +16 -16
package/dist/dts/main/main.d.ts
CHANGED
|
@@ -90,7 +90,7 @@ import { MainRouterConfig } from '../routes';
|
|
|
90
90
|
* // Otherwise route them to login
|
|
91
91
|
* phase.cancel(() => {
|
|
92
92
|
* session.captureReturnUrl();
|
|
93
|
-
*
|
|
93
|
+
* FoundationRouteNav.name.replace(phase.router, 'login');
|
|
94
94
|
* });
|
|
95
95
|
* },
|
|
96
96
|
* });
|
|
@@ -54,9 +54,8 @@ export declare class BaseRoute extends ConfigHostElement {
|
|
|
54
54
|
setError(message: string): void;
|
|
55
55
|
clearError(): void;
|
|
56
56
|
get orgUsername(): string;
|
|
57
|
-
getSubRoutePath(routeName: Routes | string): string;
|
|
58
57
|
onBack: () => void;
|
|
59
|
-
onNavigate: (
|
|
58
|
+
onNavigate: (routeName: Routes, params?: Object, trigger?: boolean) => void;
|
|
60
59
|
queueOnBack(delay?: number): void;
|
|
61
60
|
autofill(): Promise<boolean>;
|
|
62
61
|
storeCredentials(password?: string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/routes/base.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,OAAO,EAEP,iBAAiB,EAEjB,OAAO,EACP,cAAc,EACd,OAAO,EACR,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/routes/base.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { Auth
|
|
2
|
-
import {
|
|
3
|
-
import { Container } from '@microsoft/fast-foundation';
|
|
4
|
-
import { RouterConfiguration } from '@microsoft/fast-router';
|
|
1
|
+
import { Auth } from '@genesislcap/foundation-comms';
|
|
2
|
+
import { FoundationRouterConfiguration } from '@genesislcap/foundation-ui';
|
|
5
3
|
import { LoginConfig } from '../main/config';
|
|
6
4
|
import type { Settings } from './types';
|
|
7
5
|
/**
|
|
@@ -14,14 +12,10 @@ import type { Settings } from './types';
|
|
|
14
12
|
*
|
|
15
13
|
* @internal
|
|
16
14
|
*/
|
|
17
|
-
export declare class MainRouterConfig extends
|
|
15
|
+
export declare class MainRouterConfig extends FoundationRouterConfiguration<Settings> {
|
|
18
16
|
private auth;
|
|
19
|
-
private container;
|
|
20
|
-
private analytics;
|
|
21
|
-
private session;
|
|
22
17
|
private loginConfig;
|
|
23
|
-
constructor(auth: Auth,
|
|
18
|
+
constructor(auth: Auth, loginConfig?: LoginConfig);
|
|
24
19
|
configure(): void;
|
|
25
|
-
construct<T>(Type: Constructable<T>): T;
|
|
26
20
|
}
|
|
27
21
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/routes/config.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/routes/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAI3E,OAAO,EAAsB,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAQjE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGxC;;;;;;;;;GASG;AACH,qBAAa,gBAAiB,SAAQ,6BAA6B,CAAC,QAAQ,CAAC;IAEnE,OAAO,CAAC,IAAI;IACK,OAAO,CAAC,WAAW;gBAD5B,IAAI,EAAE,IAAI,EACO,WAAW,cAAqB;IAK1D,SAAS;CAuHjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forgot-password.d.ts","sourceRoot":"","sources":["../../../../src/routes/forgot-password/forgot-password.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGpC,qBAKa,cAAe,SAAQ,SAAS;IACrC,iBAAiB;IAKjB,QAAQ;
|
|
1
|
+
{"version":3,"file":"forgot-password.d.ts","sourceRoot":"","sources":["../../../../src/routes/forgot-password/forgot-password.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGpC,qBAKa,cAAe,SAAQ,SAAS;IACrC,iBAAiB;IAKjB,QAAQ;CAyBf"}
|
package/dist/esm/main/main.js
CHANGED
|
@@ -95,7 +95,7 @@ import { definition, standaloneDefinition } from './main.definition';
|
|
|
95
95
|
* // Otherwise route them to login
|
|
96
96
|
* phase.cancel(() => {
|
|
97
97
|
* session.captureReturnUrl();
|
|
98
|
-
*
|
|
98
|
+
* FoundationRouteNav.name.replace(phase.router, 'login');
|
|
99
99
|
* });
|
|
100
100
|
* },
|
|
101
101
|
* });
|
package/dist/esm/routes/base.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __awaiter, __decorate } from "tslib";
|
|
2
2
|
import { Auth, Connect, CredentialManager, credentialSeparator, MessageBuilder, Session, } from '@genesislcap/foundation-comms';
|
|
3
3
|
import { I18next } from '@genesislcap/foundation-i18n';
|
|
4
|
+
import { FoundationRouteNav } from '@genesislcap/foundation-ui';
|
|
4
5
|
import { sync } from '@genesislcap/foundation-utils';
|
|
5
6
|
import { SecondaryRapidColorHEX } from '@genesislcap/foundation-zero';
|
|
6
7
|
import { attr, css, customElement, FASTElement, html, observable, when, } from '@microsoft/fast-element';
|
|
7
8
|
import { Container } from '@microsoft/fast-foundation';
|
|
8
|
-
import { Route } from '@microsoft/fast-router';
|
|
9
9
|
import { classNames } from '@microsoft/fast-web-utilities';
|
|
10
10
|
import merge from 'lodash/merge';
|
|
11
11
|
import { defaultLoginConfig, hostUrl, LoginConfig } from '../main/config';
|
|
@@ -55,8 +55,10 @@ export class BaseRoute extends ConfigHostElement {
|
|
|
55
55
|
this.message = '';
|
|
56
56
|
this.hasErrors = false;
|
|
57
57
|
this.isSubmitting = false;
|
|
58
|
-
this.onBack = () => this.onNavigate('
|
|
59
|
-
this.onNavigate = (
|
|
58
|
+
this.onBack = () => this.onNavigate('login');
|
|
59
|
+
this.onNavigate = (routeName, params = {}, trigger = true) => {
|
|
60
|
+
FoundationRouteNav.name.push(this, routeName, params, trigger);
|
|
61
|
+
};
|
|
60
62
|
}
|
|
61
63
|
connectedCallback() {
|
|
62
64
|
var _a;
|
|
@@ -107,9 +109,6 @@ export class BaseRoute extends ConfigHostElement {
|
|
|
107
109
|
? `${this.username.trim()}:${this.organisation.trim()}`
|
|
108
110
|
: this.username.trim();
|
|
109
111
|
}
|
|
110
|
-
getSubRoutePath(routeName) {
|
|
111
|
-
return this.config.hostPath !== '' ? `${this.config.hostPath}/${routeName}` : routeName;
|
|
112
|
-
}
|
|
113
112
|
queueOnBack(delay) {
|
|
114
113
|
var _a;
|
|
115
114
|
setTimeout(() => {
|
|
@@ -117,8 +116,8 @@ export class BaseRoute extends ConfigHostElement {
|
|
|
117
116
|
}, delay || ((_a = this.config.messageDelays) === null || _a === void 0 ? void 0 : _a.base) || defaultOnBackMS);
|
|
118
117
|
}
|
|
119
118
|
autofill() {
|
|
119
|
+
var _a, _b, _c;
|
|
120
120
|
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
-
var _a, _b, _c;
|
|
122
121
|
let credentialData;
|
|
123
122
|
try {
|
|
124
123
|
/**
|
|
@@ -166,8 +165,8 @@ export class BaseRoute extends ConfigHostElement {
|
|
|
166
165
|
this.credentialManager.storeCredentials(data);
|
|
167
166
|
}
|
|
168
167
|
}
|
|
169
|
-
sendMessage(
|
|
170
|
-
return __awaiter(this,
|
|
168
|
+
sendMessage(message, successFeedback = '', successCallback, delayBack) {
|
|
169
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
171
170
|
yield this.ensureConnection();
|
|
172
171
|
this.clearError();
|
|
173
172
|
try {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __awaiter, __decorate, __param } from "tslib";
|
|
2
|
-
import { Auth
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { Auth } from '@genesislcap/foundation-comms';
|
|
3
|
+
import { FoundationRouterConfiguration } from '@genesislcap/foundation-ui';
|
|
4
|
+
import { optional } from '@microsoft/fast-foundation';
|
|
5
5
|
import { defaultLayout } from '../layouts';
|
|
6
6
|
import { defaultLoginConfig, LoginConfig } from '../main/config';
|
|
7
7
|
import { ForgotPassword } from './forgot-password/forgot-password';
|
|
@@ -22,28 +22,19 @@ import { Verify } from './verify/verify';
|
|
|
22
22
|
*
|
|
23
23
|
* @internal
|
|
24
24
|
*/
|
|
25
|
-
let MainRouterConfig = class MainRouterConfig extends
|
|
26
|
-
constructor(auth,
|
|
25
|
+
let MainRouterConfig = class MainRouterConfig extends FoundationRouterConfiguration {
|
|
26
|
+
constructor(auth, loginConfig = defaultLoginConfig) {
|
|
27
27
|
super();
|
|
28
28
|
this.auth = auth;
|
|
29
|
-
this.container = container;
|
|
30
|
-
this.analytics = analytics;
|
|
31
|
-
this.session = session;
|
|
32
29
|
this.loginConfig = loginConfig;
|
|
33
30
|
}
|
|
34
31
|
configure() {
|
|
35
32
|
this.title = 'Login';
|
|
33
|
+
this.loginPath = '';
|
|
36
34
|
this.defaultLayout = defaultLayout;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
* const { define, templateOptions, template, styles } = await import(
|
|
41
|
-
* /!* webpackChunkName: "login-form" *!/
|
|
42
|
-
* './login-form'
|
|
43
|
-
* );
|
|
44
|
-
* return define(this.compose(templateOptions, template, styles, 'login-form'));
|
|
45
|
-
* },
|
|
46
|
-
*/
|
|
35
|
+
this.configureAnalytics();
|
|
36
|
+
this.configureRoutePermittedChecks();
|
|
37
|
+
this.configureFallbackRouteDefinition();
|
|
47
38
|
const routes = [
|
|
48
39
|
{
|
|
49
40
|
path: '',
|
|
@@ -114,63 +105,40 @@ let MainRouterConfig = class MainRouterConfig extends RouterConfiguration {
|
|
|
114
105
|
});
|
|
115
106
|
}
|
|
116
107
|
this.routes.map(...routes);
|
|
117
|
-
const session = this.session;
|
|
118
|
-
const auth = this.auth;
|
|
119
|
-
const analytics = this.analytics;
|
|
120
|
-
/**
|
|
121
|
-
* Example of a FallbackRouteDefinition
|
|
122
|
-
*/
|
|
123
|
-
this.routes.fallback(() => auth.isLoggedIn ? { redirect: 'not-found' } : { redirect: 'login' });
|
|
124
108
|
/**
|
|
125
109
|
* Example of a NavigationContributor
|
|
126
110
|
*/
|
|
127
111
|
this.contributors.push({
|
|
128
112
|
navigate: (phase) => __awaiter(this, void 0, void 0, function* () {
|
|
129
113
|
const settings = phase.route.settings;
|
|
130
|
-
/**
|
|
131
|
-
* TODO: Centralise
|
|
132
|
-
* Suspect this should be done via createEventSink, but it's not fully clear how-to do that as no docs
|
|
133
|
-
*/
|
|
134
|
-
analytics.trackEvent(FoundationAnalyticsEventType.routeChanged, {
|
|
135
|
-
path: phase.route.endpoint.path,
|
|
136
|
-
});
|
|
137
114
|
/**
|
|
138
115
|
* If public route don't block
|
|
139
116
|
*/
|
|
140
|
-
if (settings
|
|
117
|
+
if (settings === null || settings === void 0 ? void 0 : settings.public) {
|
|
141
118
|
return;
|
|
142
119
|
}
|
|
143
120
|
/**
|
|
144
|
-
* If
|
|
121
|
+
* If authenticated don't block
|
|
145
122
|
*/
|
|
146
|
-
if (
|
|
123
|
+
if (this.user.isAuthenticated) {
|
|
147
124
|
return;
|
|
148
125
|
}
|
|
149
126
|
/**
|
|
150
|
-
* If
|
|
127
|
+
* If autoAuth and session is valid try to connect+auto-login
|
|
151
128
|
*/
|
|
152
|
-
if (this.loginConfig.autoAuth && (yield auth.reAuthFromSession())) {
|
|
129
|
+
if (this.loginConfig.autoAuth && (yield this.auth.reAuthFromSession())) {
|
|
153
130
|
return;
|
|
154
131
|
}
|
|
155
132
|
/**
|
|
156
133
|
* Otherwise route them to login
|
|
157
134
|
*/
|
|
158
|
-
|
|
159
|
-
session.captureReturnUrl();
|
|
160
|
-
Route.name.replace(phase.router, 'login');
|
|
161
|
-
});
|
|
135
|
+
this.navigationPhaseLoginRedirect(phase);
|
|
162
136
|
}),
|
|
163
137
|
});
|
|
164
138
|
}
|
|
165
|
-
construct(Type) {
|
|
166
|
-
return this.container.get(Type);
|
|
167
|
-
}
|
|
168
139
|
};
|
|
169
140
|
MainRouterConfig = __decorate([
|
|
170
141
|
__param(0, Auth),
|
|
171
|
-
__param(1,
|
|
172
|
-
__param(2, FoundationAnalytics),
|
|
173
|
-
__param(3, Session),
|
|
174
|
-
__param(4, optional(LoginConfig))
|
|
142
|
+
__param(1, optional(LoginConfig))
|
|
175
143
|
], MainRouterConfig);
|
|
176
144
|
export { MainRouterConfig };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __awaiter, __decorate } from "tslib";
|
|
2
|
+
import { FoundationRouteNav } from '@genesislcap/foundation-ui';
|
|
2
3
|
import { customElement } from '@microsoft/fast-element';
|
|
3
|
-
import { hostEnv } from '../../main/config';
|
|
4
4
|
import { commonLoginRouteStyles } from '../../styles';
|
|
5
5
|
import { logger } from '../../utils';
|
|
6
6
|
import { BaseRoute } from '../base';
|
|
@@ -20,15 +20,22 @@ let ForgotPassword = class ForgotPassword extends BaseRoute {
|
|
|
20
20
|
onSubmit: { get: () => super.onSubmit }
|
|
21
21
|
});
|
|
22
22
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
var _a;
|
|
24
23
|
logger.debug('forgot password submission');
|
|
25
24
|
yield _super.onSubmit.call(this);
|
|
25
|
+
const navigationPathCallback = (fullPath) => __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
var _a;
|
|
27
|
+
const message = this.messageBuilder.createForgotPasswordMessage(this.orgUsername, fullPath);
|
|
28
|
+
yield this.sendMessage(message, this.toLocalisedText('FORGOTTEN_PASSWORD_SUCCESS_MESSAGE'), undefined, (_a = this.config.messageDelays) === null || _a === void 0 ? void 0 : _a.forgotPassword);
|
|
29
|
+
});
|
|
26
30
|
/**
|
|
27
31
|
* Example url from email: https://public-foundation.genesislab.global/reset-password?password=nc_cbGrlgCkZeJHAF043oqEidnk
|
|
28
32
|
*/
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
// this.$emit('generate-navigation-path', {
|
|
34
|
+
// path: 'reset-password',
|
|
35
|
+
// callback: navigationPathCallback,
|
|
36
|
+
// });
|
|
37
|
+
const fullPath = yield FoundationRouteNav.name.generateRoute(this, 'reset-password');
|
|
38
|
+
yield navigationPathCallback(fullPath);
|
|
32
39
|
});
|
|
33
40
|
}
|
|
34
41
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __awaiter, __decorate } from "tslib";
|
|
2
2
|
import { AuthError } from '@genesislcap/foundation-comms';
|
|
3
|
+
import { FoundationRouteNav } from '@genesislcap/foundation-ui';
|
|
3
4
|
import { inIFrame, inSymphonyDesktop, openPopup } from '@genesislcap/foundation-utils';
|
|
4
5
|
import { customElement, DOM, observable, volatile } from '@microsoft/fast-element';
|
|
5
|
-
import { Route } from '@microsoft/fast-router';
|
|
6
6
|
import { logger, getSSOLoginURL, fetchIDPs } from '../../utils';
|
|
7
7
|
import { BaseRoute } from '../base';
|
|
8
8
|
import { LoginFormStyles as styles } from './login-form.styles';
|
|
@@ -24,8 +24,8 @@ let LoginForm = class LoginForm extends BaseRoute {
|
|
|
24
24
|
const _super = Object.create(null, {
|
|
25
25
|
connectedCallback: { get: () => super.connectedCallback }
|
|
26
26
|
});
|
|
27
|
+
var _a, _b;
|
|
27
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
-
var _a, _b;
|
|
29
29
|
_super.connectedCallback.call(this);
|
|
30
30
|
this.ssoToggled = (_b = (_a = this.config.sso) === null || _a === void 0 ? void 0 : _a.toggled) !== null && _b !== void 0 ? _b : false;
|
|
31
31
|
if (this.connect.isConnected && this.auth.isLoggedIn) {
|
|
@@ -194,14 +194,14 @@ let LoginForm = class LoginForm extends BaseRoute {
|
|
|
194
194
|
this.config.redirectHandler(url);
|
|
195
195
|
}
|
|
196
196
|
else {
|
|
197
|
-
|
|
197
|
+
FoundationRouteNav.path.push(url);
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
catch (err) {
|
|
201
201
|
if (err instanceof AuthError) {
|
|
202
202
|
if (err.hasPasswordExpiredError()) {
|
|
203
203
|
this.storeCredentials();
|
|
204
|
-
this.onNavigate(
|
|
204
|
+
this.onNavigate('reset-password', { expired: true });
|
|
205
205
|
return;
|
|
206
206
|
}
|
|
207
207
|
if (err.hasMFAError()) {
|
|
@@ -13,7 +13,7 @@ const regularLogin = html `
|
|
|
13
13
|
${when((x) => !x.config.omitRoutes.includes('forgot-password'), html `
|
|
14
14
|
<zero-button
|
|
15
15
|
appearance="lightweight"
|
|
16
|
-
@click=${(x) => x.onNavigate(
|
|
16
|
+
@click=${(x) => x.onNavigate(`forgot-password`)}
|
|
17
17
|
data-test-id="forgot-password"
|
|
18
18
|
>
|
|
19
19
|
${(x) => x.toLocalisedText('LOGIN_FORM_FORGOT_PASSWORD_LINK')}
|
|
@@ -22,7 +22,7 @@ const regularLogin = html `
|
|
|
22
22
|
${when((x) => !x.config.omitRoutes.includes('reset-password'), html `
|
|
23
23
|
<zero-button
|
|
24
24
|
appearance="lightweight"
|
|
25
|
-
@click=${(x) => x.onNavigate(
|
|
25
|
+
@click=${(x) => x.onNavigate(`reset-password`)}
|
|
26
26
|
data-test-id="reset-password"
|
|
27
27
|
>
|
|
28
28
|
${(x) => x.toLocalisedText('LOGIN_FORM_CHANGE_PASSWORD_LINK')}
|
|
@@ -33,7 +33,7 @@ const regularLogin = html `
|
|
|
33
33
|
${when((x) => !x.config.omitRoutes.includes('request-account'), html `
|
|
34
34
|
<zero-button
|
|
35
35
|
appearance="lightweight"
|
|
36
|
-
@click=${(x) => x.onNavigate(
|
|
36
|
+
@click=${(x) => x.onNavigate(`request-account`)}
|
|
37
37
|
data-test-id="request-account"
|
|
38
38
|
>
|
|
39
39
|
${(x) => x.toLocalisedText('LOGIN_FORM_REQUEST_ACCOUNT_LINK')}
|
|
@@ -38,8 +38,8 @@ let ResetPassword = class ResetPassword extends BaseRoute {
|
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
onForgotPasswordWorkflow() {
|
|
41
|
+
var _a;
|
|
41
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
-
var _a;
|
|
43
43
|
logger.debug('forgot password submission');
|
|
44
44
|
const message = this.messageBuilder.createForgotPasswordTokenMessage(this.orgUsername, this.passwordResetToken, this.password2);
|
|
45
45
|
yield this.sendMessage(message, this.toLocalisedText('RESET_PASSWORD_SUCCESS'), () => {
|
|
@@ -48,8 +48,8 @@ let ResetPassword = class ResetPassword extends BaseRoute {
|
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
onChangePasswordWorkflow() {
|
|
51
|
+
var _a;
|
|
51
52
|
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
-
var _a;
|
|
53
53
|
logger.debug('change password submission');
|
|
54
54
|
const message = this.messageBuilder.createChangePasswordMessage(this.orgUsername, this.password, this.password2);
|
|
55
55
|
yield this.sendMessage(message, this.toLocalisedText('RESET_PASSWORD_CHANGE_SUCCESS'), () => {
|
package/dist/esm/utils/sso.js
CHANGED
|
@@ -30,7 +30,7 @@ export const getSSOLoginURL = (idp, path = '/login?idp=', host = API_HOST) => {
|
|
|
30
30
|
*
|
|
31
31
|
* @public
|
|
32
32
|
*/
|
|
33
|
-
export const fetchIDPs = (
|
|
33
|
+
export const fetchIDPs = (path = 'sso/list', host = API_HOST) => __awaiter(void 0, void 0, void 0, function* () {
|
|
34
34
|
const IDP_ENDPOINT = getIPDEndpoint(path, host);
|
|
35
35
|
return fetch(IDP_ENDPOINT)
|
|
36
36
|
.then((res) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"metadata": {
|
|
3
3
|
"toolPackage": "@microsoft/api-extractor",
|
|
4
|
-
"toolVersion": "7.
|
|
4
|
+
"toolVersion": "7.34.9",
|
|
5
5
|
"schemaVersion": 1011,
|
|
6
6
|
"oldestForwardsCompatibleVersion": 1001,
|
|
7
7
|
"tsdocConfig": {
|
|
@@ -606,29 +606,17 @@
|
|
|
606
606
|
}
|
|
607
607
|
},
|
|
608
608
|
{
|
|
609
|
-
"kind": "
|
|
610
|
-
"canonicalReference": "@genesislcap/foundation-login!fetchIDPs:
|
|
609
|
+
"kind": "Variable",
|
|
610
|
+
"canonicalReference": "@genesislcap/foundation-login!fetchIDPs:var",
|
|
611
611
|
"docComment": "/**\n * Request SSO identity provider list\n *\n * @public\n */\n",
|
|
612
612
|
"excerptTokens": [
|
|
613
613
|
{
|
|
614
614
|
"kind": "Content",
|
|
615
|
-
"text": "fetchIDPs:
|
|
616
|
-
},
|
|
617
|
-
{
|
|
618
|
-
"kind": "Content",
|
|
619
|
-
"text": "string"
|
|
615
|
+
"text": "fetchIDPs: "
|
|
620
616
|
},
|
|
621
617
|
{
|
|
622
618
|
"kind": "Content",
|
|
623
|
-
"text": ", host?: "
|
|
624
|
-
},
|
|
625
|
-
{
|
|
626
|
-
"kind": "Content",
|
|
627
|
-
"text": "string"
|
|
628
|
-
},
|
|
629
|
-
{
|
|
630
|
-
"kind": "Content",
|
|
631
|
-
"text": ") => "
|
|
619
|
+
"text": "(path?: string, host?: string) => "
|
|
632
620
|
},
|
|
633
621
|
{
|
|
634
622
|
"kind": "Reference",
|
|
@@ -650,31 +638,13 @@
|
|
|
650
638
|
}
|
|
651
639
|
],
|
|
652
640
|
"fileUrlPath": "src/utils/sso.ts",
|
|
653
|
-
"
|
|
654
|
-
"startIndex": 5,
|
|
655
|
-
"endIndex": 9
|
|
656
|
-
},
|
|
641
|
+
"isReadonly": true,
|
|
657
642
|
"releaseTag": "Public",
|
|
658
|
-
"
|
|
659
|
-
"
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
"startIndex": 1,
|
|
664
|
-
"endIndex": 2
|
|
665
|
-
},
|
|
666
|
-
"isOptional": true
|
|
667
|
-
},
|
|
668
|
-
{
|
|
669
|
-
"parameterName": "host",
|
|
670
|
-
"parameterTypeTokenRange": {
|
|
671
|
-
"startIndex": 3,
|
|
672
|
-
"endIndex": 4
|
|
673
|
-
},
|
|
674
|
-
"isOptional": true
|
|
675
|
-
}
|
|
676
|
-
],
|
|
677
|
-
"name": "fetchIDPs"
|
|
643
|
+
"name": "fetchIDPs",
|
|
644
|
+
"variableTypeTokenRange": {
|
|
645
|
+
"startIndex": 1,
|
|
646
|
+
"endIndex": 6
|
|
647
|
+
}
|
|
678
648
|
},
|
|
679
649
|
{
|
|
680
650
|
"kind": "TypeAlias",
|
|
@@ -794,77 +764,27 @@
|
|
|
794
764
|
"name": "getLoginRouting"
|
|
795
765
|
},
|
|
796
766
|
{
|
|
797
|
-
"kind": "
|
|
798
|
-
"canonicalReference": "@genesislcap/foundation-login!getSSOLoginURL:
|
|
767
|
+
"kind": "Variable",
|
|
768
|
+
"canonicalReference": "@genesislcap/foundation-login!getSSOLoginURL:var",
|
|
799
769
|
"docComment": "/**\n * Get SSO identity provider login URL\n *\n * @public\n */\n",
|
|
800
770
|
"excerptTokens": [
|
|
801
771
|
{
|
|
802
772
|
"kind": "Content",
|
|
803
|
-
"text": "getSSOLoginURL:
|
|
804
|
-
},
|
|
805
|
-
{
|
|
806
|
-
"kind": "Content",
|
|
807
|
-
"text": "any"
|
|
808
|
-
},
|
|
809
|
-
{
|
|
810
|
-
"kind": "Content",
|
|
811
|
-
"text": ", path?: "
|
|
812
|
-
},
|
|
813
|
-
{
|
|
814
|
-
"kind": "Content",
|
|
815
|
-
"text": "string"
|
|
816
|
-
},
|
|
817
|
-
{
|
|
818
|
-
"kind": "Content",
|
|
819
|
-
"text": ", host?: "
|
|
820
|
-
},
|
|
821
|
-
{
|
|
822
|
-
"kind": "Content",
|
|
823
|
-
"text": "string"
|
|
824
|
-
},
|
|
825
|
-
{
|
|
826
|
-
"kind": "Content",
|
|
827
|
-
"text": ") => "
|
|
773
|
+
"text": "getSSOLoginURL: "
|
|
828
774
|
},
|
|
829
775
|
{
|
|
830
776
|
"kind": "Content",
|
|
831
|
-
"text": "string"
|
|
777
|
+
"text": "(idp: any, path?: string, host?: string) => string"
|
|
832
778
|
}
|
|
833
779
|
],
|
|
834
780
|
"fileUrlPath": "src/utils/sso.ts",
|
|
835
|
-
"
|
|
836
|
-
"startIndex": 7,
|
|
837
|
-
"endIndex": 8
|
|
838
|
-
},
|
|
781
|
+
"isReadonly": true,
|
|
839
782
|
"releaseTag": "Public",
|
|
840
|
-
"
|
|
841
|
-
"
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
"startIndex": 1,
|
|
846
|
-
"endIndex": 2
|
|
847
|
-
},
|
|
848
|
-
"isOptional": false
|
|
849
|
-
},
|
|
850
|
-
{
|
|
851
|
-
"parameterName": "path",
|
|
852
|
-
"parameterTypeTokenRange": {
|
|
853
|
-
"startIndex": 3,
|
|
854
|
-
"endIndex": 4
|
|
855
|
-
},
|
|
856
|
-
"isOptional": true
|
|
857
|
-
},
|
|
858
|
-
{
|
|
859
|
-
"parameterName": "host",
|
|
860
|
-
"parameterTypeTokenRange": {
|
|
861
|
-
"startIndex": 5,
|
|
862
|
-
"endIndex": 6
|
|
863
|
-
},
|
|
864
|
-
"isOptional": true
|
|
865
|
-
}
|
|
866
|
-
],
|
|
867
|
-
"name": "getSSOLoginURL"
|
|
783
|
+
"name": "getSSOLoginURL",
|
|
784
|
+
"variableTypeTokenRange": {
|
|
785
|
+
"startIndex": 1,
|
|
786
|
+
"endIndex": 2
|
|
787
|
+
}
|
|
868
788
|
},
|
|
869
789
|
{
|
|
870
790
|
"kind": "Variable",
|
|
@@ -1104,7 +1024,7 @@
|
|
|
1104
1024
|
{
|
|
1105
1025
|
"kind": "Class",
|
|
1106
1026
|
"canonicalReference": "@genesislcap/foundation-login!Login:class",
|
|
1107
|
-
"docComment": "/**\n * Defines the login class which handles account authentication from the front-end\n *\n * @remarks\n *\n * Add the Login class as a router element, and it will handle the account authentication for you. Requires use of `@genesislcap/foundation-comms` for the {@link @genesislcap/foundation-comms#Auth | Auth} and {@link @genesislcap/foundation#Session | Session} classes.\n *\n * There are a lot of configuration options available, and different authentication types (such as login via SSO). Use the modules exported `configure` and `define` functions for more power.\n *\n * @deprecated\n *\n * - Use '\\@genesislcap/pbc-auth' instead. 'https://www.npmjs.com/package/\\@genesislcap/pbc-auth'\n *\n * @example\n *\n * The following is an example of using it in your app, setting it up in the router configuration. This isn't a complete routes confutation, but it contains all required configuration in regard to adding Login functionality.\n * ```ts\n * // Import required dependencies from the foundation-login package\n * import { Login } from '@genesislcap/foundation-login';\n * // Import required dependencies from the foundation-comms package\n * // You could also import analytics events and set them up in the NavigationContributor\n * import { Auth, Session } from '@genesislcap/foundation-comms';\n *\n * type RouterSettings = {\n * public?: boolean;\n * autoAuth?: boolean;\n * }\n *\n * // Define your router config\n * export class MainRouterConfig extends RouterConfiguration<RouterSettings> {\n * // Ensure you inject in required dependencies\n * constructor(\n * @Auth private auth: Auth,\n * @Session private session: Session\n * ) {\n * super();\n * }\n *\n * // Add Login as a route\n * public configure() {\n * ...\n * this.routes.map(\n * { path: '', redirect: 'login' },\n * {\n * path: 'login',\n * element: Login,\n * title: 'Login',\n * name: 'login',\n * layout: loginLayout,\n * settings: { public: true },\n * childRouters: true,\n * },\n * ... // Other routes config here\n * );\n *\n * const session = this.session;\n * const auth = this.auth;\n *\n * // Example of a FallbackRouteDefinition\n * this.routes.fallback(() =>\n * auth.isLoggedIn ? { redirect: 'not-found' } : { redirect: 'login' }\n * );\n *\n * // Example of a NavigationContributor\n * this.contributors.push({\n * navigate: async (phase) => {\n * const settings = phase.route.settings;\n *\n * // Could add in processes such as analytics here\n *\n * // If public route don't block\n * if (settings && settings.public) {\n * return;\n * }\n *\n * // If logged in don't block\n * if (auth.isLoggedIn) {\n * return;\n * }\n *\n * // If autoAuth and session is valid try to connect+auto-login\n * if (settings && settings.autoAuth && (await auth.reAuthFromSession())) {\n * return;\n * }\n *\n * // Otherwise route them to login\n * phase.cancel(() => {\n * session.captureReturnUrl();\n *
|
|
1027
|
+
"docComment": "/**\n * Defines the login class which handles account authentication from the front-end\n *\n * @remarks\n *\n * Add the Login class as a router element, and it will handle the account authentication for you. Requires use of `@genesislcap/foundation-comms` for the {@link @genesislcap/foundation-comms#Auth | Auth} and {@link @genesislcap/foundation#Session | Session} classes.\n *\n * There are a lot of configuration options available, and different authentication types (such as login via SSO). Use the modules exported `configure` and `define` functions for more power.\n *\n * @deprecated\n *\n * - Use '\\@genesislcap/pbc-auth' instead. 'https://www.npmjs.com/package/\\@genesislcap/pbc-auth'\n *\n * @example\n *\n * The following is an example of using it in your app, setting it up in the router configuration. This isn't a complete routes confutation, but it contains all required configuration in regard to adding Login functionality.\n * ```ts\n * // Import required dependencies from the foundation-login package\n * import { Login } from '@genesislcap/foundation-login';\n * // Import required dependencies from the foundation-comms package\n * // You could also import analytics events and set them up in the NavigationContributor\n * import { Auth, Session } from '@genesislcap/foundation-comms';\n *\n * type RouterSettings = {\n * public?: boolean;\n * autoAuth?: boolean;\n * }\n *\n * // Define your router config\n * export class MainRouterConfig extends RouterConfiguration<RouterSettings> {\n * // Ensure you inject in required dependencies\n * constructor(\n * @Auth private auth: Auth,\n * @Session private session: Session\n * ) {\n * super();\n * }\n *\n * // Add Login as a route\n * public configure() {\n * ...\n * this.routes.map(\n * { path: '', redirect: 'login' },\n * {\n * path: 'login',\n * element: Login,\n * title: 'Login',\n * name: 'login',\n * layout: loginLayout,\n * settings: { public: true },\n * childRouters: true,\n * },\n * ... // Other routes config here\n * );\n *\n * const session = this.session;\n * const auth = this.auth;\n *\n * // Example of a FallbackRouteDefinition\n * this.routes.fallback(() =>\n * auth.isLoggedIn ? { redirect: 'not-found' } : { redirect: 'login' }\n * );\n *\n * // Example of a NavigationContributor\n * this.contributors.push({\n * navigate: async (phase) => {\n * const settings = phase.route.settings;\n *\n * // Could add in processes such as analytics here\n *\n * // If public route don't block\n * if (settings && settings.public) {\n * return;\n * }\n *\n * // If logged in don't block\n * if (auth.isLoggedIn) {\n * return;\n * }\n *\n * // If autoAuth and session is valid try to connect+auto-login\n * if (settings && settings.autoAuth && (await auth.reAuthFromSession())) {\n * return;\n * }\n *\n * // Otherwise route them to login\n * phase.cancel(() => {\n * session.captureReturnUrl();\n * FoundationRouteNav.name.replace(phase.router, 'login');\n * });\n * },\n * });\n * }\n *\n * ... // Other configuration/methods\n *\n * }\n * ```\n *\n * @public\n */\n",
|
|
1108
1028
|
"excerptTokens": [
|
|
1109
1029
|
{
|
|
1110
1030
|
"kind": "Content",
|
|
@@ -1987,13 +1907,17 @@
|
|
|
1987
1907
|
}
|
|
1988
1908
|
},
|
|
1989
1909
|
{
|
|
1990
|
-
"kind": "
|
|
1991
|
-
"canonicalReference": "@genesislcap/foundation-login!styles:
|
|
1910
|
+
"kind": "Variable",
|
|
1911
|
+
"canonicalReference": "@genesislcap/foundation-login!styles:var",
|
|
1992
1912
|
"docComment": "/**\n * @example\n *\n * unknown target\n * ```\n * const buttonTag = tagFor(options.button);\n * ...\n * ${buttonTag} {\n * width: 200px;\n * }\n * ```\n *\n * @public\n */\n",
|
|
1993
1913
|
"excerptTokens": [
|
|
1994
1914
|
{
|
|
1995
1915
|
"kind": "Content",
|
|
1996
|
-
"text": "styles:
|
|
1916
|
+
"text": "styles: "
|
|
1917
|
+
},
|
|
1918
|
+
{
|
|
1919
|
+
"kind": "Content",
|
|
1920
|
+
"text": "(options: "
|
|
1997
1921
|
},
|
|
1998
1922
|
{
|
|
1999
1923
|
"kind": "Reference",
|
|
@@ -2002,11 +1926,7 @@
|
|
|
2002
1926
|
},
|
|
2003
1927
|
{
|
|
2004
1928
|
"kind": "Content",
|
|
2005
|
-
"text": ") => "
|
|
2006
|
-
},
|
|
2007
|
-
{
|
|
2008
|
-
"kind": "Content",
|
|
2009
|
-
"text": "import(\"@microsoft/fast-element\")."
|
|
1929
|
+
"text": ") => import(\"@microsoft/fast-element\")."
|
|
2010
1930
|
},
|
|
2011
1931
|
{
|
|
2012
1932
|
"kind": "Reference",
|
|
@@ -2015,32 +1935,26 @@
|
|
|
2015
1935
|
}
|
|
2016
1936
|
],
|
|
2017
1937
|
"fileUrlPath": "src/main/main.styles.ts",
|
|
2018
|
-
"
|
|
2019
|
-
"startIndex": 3,
|
|
2020
|
-
"endIndex": 5
|
|
2021
|
-
},
|
|
1938
|
+
"isReadonly": true,
|
|
2022
1939
|
"releaseTag": "Public",
|
|
2023
|
-
"
|
|
2024
|
-
"
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
"startIndex": 1,
|
|
2029
|
-
"endIndex": 2
|
|
2030
|
-
},
|
|
2031
|
-
"isOptional": false
|
|
2032
|
-
}
|
|
2033
|
-
],
|
|
2034
|
-
"name": "styles"
|
|
1940
|
+
"name": "styles",
|
|
1941
|
+
"variableTypeTokenRange": {
|
|
1942
|
+
"startIndex": 1,
|
|
1943
|
+
"endIndex": 5
|
|
1944
|
+
}
|
|
2035
1945
|
},
|
|
2036
1946
|
{
|
|
2037
|
-
"kind": "
|
|
2038
|
-
"canonicalReference": "@genesislcap/foundation-login!template:
|
|
1947
|
+
"kind": "Variable",
|
|
1948
|
+
"canonicalReference": "@genesislcap/foundation-login!template:var",
|
|
2039
1949
|
"docComment": "/**\n * @public\n */\n",
|
|
2040
1950
|
"excerptTokens": [
|
|
2041
1951
|
{
|
|
2042
1952
|
"kind": "Content",
|
|
2043
|
-
"text": "template:
|
|
1953
|
+
"text": "template: "
|
|
1954
|
+
},
|
|
1955
|
+
{
|
|
1956
|
+
"kind": "Content",
|
|
1957
|
+
"text": "(options: "
|
|
2044
1958
|
},
|
|
2045
1959
|
{
|
|
2046
1960
|
"kind": "Reference",
|
|
@@ -2049,11 +1963,7 @@
|
|
|
2049
1963
|
},
|
|
2050
1964
|
{
|
|
2051
1965
|
"kind": "Content",
|
|
2052
|
-
"text": ") => "
|
|
2053
|
-
},
|
|
2054
|
-
{
|
|
2055
|
-
"kind": "Content",
|
|
2056
|
-
"text": "import(\"@microsoft/fast-element\")."
|
|
1966
|
+
"text": ") => import(\"@microsoft/fast-element\")."
|
|
2057
1967
|
},
|
|
2058
1968
|
{
|
|
2059
1969
|
"kind": "Reference",
|
|
@@ -2075,23 +1985,13 @@
|
|
|
2075
1985
|
}
|
|
2076
1986
|
],
|
|
2077
1987
|
"fileUrlPath": "src/main/main.template.ts",
|
|
2078
|
-
"
|
|
2079
|
-
"startIndex": 3,
|
|
2080
|
-
"endIndex": 8
|
|
2081
|
-
},
|
|
1988
|
+
"isReadonly": true,
|
|
2082
1989
|
"releaseTag": "Public",
|
|
2083
|
-
"
|
|
2084
|
-
"
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
"startIndex": 1,
|
|
2089
|
-
"endIndex": 2
|
|
2090
|
-
},
|
|
2091
|
-
"isOptional": false
|
|
2092
|
-
}
|
|
2093
|
-
],
|
|
2094
|
-
"name": "template"
|
|
1990
|
+
"name": "template",
|
|
1991
|
+
"variableTypeTokenRange": {
|
|
1992
|
+
"startIndex": 1,
|
|
1993
|
+
"endIndex": 8
|
|
1994
|
+
}
|
|
2095
1995
|
},
|
|
2096
1996
|
{
|
|
2097
1997
|
"kind": "TypeAlias",
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import { Auth } from '@genesislcap/foundation-comms';
|
|
2
2
|
import { Binding } from '@microsoft/fast-element';
|
|
3
3
|
import { Connect } from '@genesislcap/foundation-comms';
|
|
4
|
-
import { Constructable } from '@microsoft/fast-element';
|
|
5
4
|
import { Container } from '@microsoft/fast-foundation';
|
|
6
5
|
import { CredentialManager } from '@genesislcap/foundation-comms';
|
|
7
6
|
import { DefineFunction } from '@genesislcap/foundation-ui';
|
|
8
7
|
import { ElementStyles } from '@microsoft/fast-element';
|
|
9
8
|
import { FASTElement } from '@microsoft/fast-element';
|
|
10
|
-
import {
|
|
9
|
+
import { FoundationRouterConfiguration } from '@genesislcap/foundation-ui';
|
|
11
10
|
import { I18next } from '@genesislcap/foundation-i18n';
|
|
12
11
|
import { I18nextConfig } from '@genesislcap/foundation-i18n';
|
|
13
12
|
import { InterfaceSymbol } from '@microsoft/fast-foundation';
|
|
14
13
|
import { Message } from '@genesislcap/foundation-comms';
|
|
15
14
|
import { MessageBuilder } from '@genesislcap/foundation-comms';
|
|
16
15
|
import { PartialFASTElementDefinition } from '@microsoft/fast-element';
|
|
17
|
-
import { RouterConfiguration } from '@microsoft/fast-router';
|
|
18
16
|
import { Session } from '@genesislcap/foundation-comms';
|
|
19
17
|
import { SyntheticViewTemplate } from '@microsoft/fast-element';
|
|
20
18
|
import { TemplateElementDependency } from '@genesislcap/foundation-ui';
|
|
@@ -60,9 +58,8 @@ export declare class BaseRoute extends ConfigHostElement {
|
|
|
60
58
|
setError(message: string): void;
|
|
61
59
|
clearError(): void;
|
|
62
60
|
get orgUsername(): string;
|
|
63
|
-
getSubRoutePath(routeName: Routes | string): string;
|
|
64
61
|
onBack: () => void;
|
|
65
|
-
onNavigate: (
|
|
62
|
+
onNavigate: (routeName: Routes, params?: Object, trigger?: boolean) => void;
|
|
66
63
|
queueOnBack(delay?: number): void;
|
|
67
64
|
autofill(): Promise<boolean>;
|
|
68
65
|
storeCredentials(password?: string): void;
|
|
@@ -459,7 +456,7 @@ export declare function isMFRoute(pathname?: string): boolean;
|
|
|
459
456
|
* // Otherwise route them to login
|
|
460
457
|
* phase.cancel(() => {
|
|
461
458
|
* session.captureReturnUrl();
|
|
462
|
-
*
|
|
459
|
+
* FoundationRouteNav.name.replace(phase.router, 'login');
|
|
463
460
|
* });
|
|
464
461
|
* },
|
|
465
462
|
* });
|
|
@@ -796,15 +793,11 @@ export declare class LogoElement extends ConfigHostElement {
|
|
|
796
793
|
*
|
|
797
794
|
* @internal
|
|
798
795
|
*/
|
|
799
|
-
export declare class MainRouterConfig extends
|
|
796
|
+
export declare class MainRouterConfig extends FoundationRouterConfiguration<Settings> {
|
|
800
797
|
private auth;
|
|
801
|
-
private container;
|
|
802
|
-
private analytics;
|
|
803
|
-
private session;
|
|
804
798
|
private loginConfig;
|
|
805
|
-
constructor(auth: Auth,
|
|
799
|
+
constructor(auth: Auth, loginConfig?: LoginConfig);
|
|
806
800
|
configure(): void;
|
|
807
|
-
construct<T>(Type: Constructable<T>): T;
|
|
808
801
|
}
|
|
809
802
|
|
|
810
803
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[Home](./index.md) > [@genesislcap/foundation-login](./foundation-login.md) > [fetchIDPs](./foundation-login.fetchidps.md)
|
|
4
4
|
|
|
5
|
-
## fetchIDPs
|
|
5
|
+
## fetchIDPs variable
|
|
6
6
|
|
|
7
7
|
Request SSO identity provider list
|
|
8
8
|
|
|
@@ -11,15 +11,3 @@ Request SSO identity provider list
|
|
|
11
11
|
```typescript
|
|
12
12
|
fetchIDPs: (path?: string, host?: string) => Promise<IDP[]>
|
|
13
13
|
```
|
|
14
|
-
|
|
15
|
-
## Parameters
|
|
16
|
-
|
|
17
|
-
| Parameter | Type | Description |
|
|
18
|
-
| --- | --- | --- |
|
|
19
|
-
| path | string | _(Optional)_ |
|
|
20
|
-
| host | string | _(Optional)_ |
|
|
21
|
-
|
|
22
|
-
**Returns:**
|
|
23
|
-
|
|
24
|
-
Promise<[IDP](./foundation-login.idp.md)<!-- -->\[\]>
|
|
25
|
-
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[Home](./index.md) > [@genesislcap/foundation-login](./foundation-login.md) > [getSSOLoginURL](./foundation-login.getssologinurl.md)
|
|
4
4
|
|
|
5
|
-
## getSSOLoginURL
|
|
5
|
+
## getSSOLoginURL variable
|
|
6
6
|
|
|
7
7
|
Get SSO identity provider login URL
|
|
8
8
|
|
|
@@ -11,16 +11,3 @@ Get SSO identity provider login URL
|
|
|
11
11
|
```typescript
|
|
12
12
|
getSSOLoginURL: (idp: any, path?: string, host?: string) => string
|
|
13
13
|
```
|
|
14
|
-
|
|
15
|
-
## Parameters
|
|
16
|
-
|
|
17
|
-
| Parameter | Type | Description |
|
|
18
|
-
| --- | --- | --- |
|
|
19
|
-
| idp | any | |
|
|
20
|
-
| path | string | _(Optional)_ |
|
|
21
|
-
| host | string | _(Optional)_ |
|
|
22
|
-
|
|
23
|
-
**Returns:**
|
|
24
|
-
|
|
25
|
-
string
|
|
26
|
-
|
|
@@ -100,7 +100,7 @@ export class MainRouterConfig extends RouterConfiguration<RouterSettings> {
|
|
|
100
100
|
// Otherwise route them to login
|
|
101
101
|
phase.cancel(() => {
|
|
102
102
|
session.captureReturnUrl();
|
|
103
|
-
|
|
103
|
+
FoundationRouteNav.name.replace(phase.router, 'login');
|
|
104
104
|
});
|
|
105
105
|
},
|
|
106
106
|
});
|
|
@@ -17,12 +17,8 @@
|
|
|
17
17
|
| Function | Description |
|
|
18
18
|
| --- | --- |
|
|
19
19
|
| [configure(container, config)](./foundation-login.configure.md) | Configure the login micro frontend settings. |
|
|
20
|
-
| [fetchIDPs(path, host)](./foundation-login.fetchidps.md) | Request SSO identity provider list |
|
|
21
20
|
| [getLoginRouting()](./foundation-login.getloginrouting.md) | Gets LoginRouting from the DI container. |
|
|
22
|
-
| [getSSOLoginURL(idp, path, host)](./foundation-login.getssologinurl.md) | Get SSO identity provider login URL |
|
|
23
21
|
| [isMFRoute(pathname)](./foundation-login.ismfroute.md) | A utility to check if a pathname is a route of this micro frontend. |
|
|
24
|
-
| [styles(options)](./foundation-login.styles.md) | |
|
|
25
|
-
| [template(options)](./foundation-login.template.md) | |
|
|
26
22
|
|
|
27
23
|
## Interfaces
|
|
28
24
|
|
|
@@ -46,9 +42,13 @@
|
|
|
46
42
|
| [defaultUser](./foundation-login.defaultuser.md) | |
|
|
47
43
|
| [define](./foundation-login.define.md) | **_(BETA)_** Re-define the login micro frontend. |
|
|
48
44
|
| [definition](./foundation-login.definition.md) | **_(BETA)_** |
|
|
45
|
+
| [fetchIDPs](./foundation-login.fetchidps.md) | Request SSO identity provider list |
|
|
46
|
+
| [getSSOLoginURL](./foundation-login.getssologinurl.md) | Get SSO identity provider login URL |
|
|
49
47
|
| [hostEnv](./foundation-login.hostenv.md) | |
|
|
50
48
|
| [hostUrl](./foundation-login.hosturl.md) | |
|
|
51
49
|
| [Routes](./foundation-login.routes.md) | |
|
|
50
|
+
| [styles](./foundation-login.styles.md) | |
|
|
51
|
+
| [template](./foundation-login.template.md) | |
|
|
52
52
|
|
|
53
53
|
## Type Aliases
|
|
54
54
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[Home](./index.md) > [@genesislcap/foundation-login](./foundation-login.md) > [styles](./foundation-login.styles.md)
|
|
4
4
|
|
|
5
|
-
## styles
|
|
5
|
+
## styles variable
|
|
6
6
|
|
|
7
7
|
**Signature:**
|
|
8
8
|
|
|
@@ -10,16 +10,6 @@
|
|
|
10
10
|
styles: (options: TemplateOptions) => import("@microsoft/fast-element").ElementStyles
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
## Parameters
|
|
14
|
-
|
|
15
|
-
| Parameter | Type | Description |
|
|
16
|
-
| --- | --- | --- |
|
|
17
|
-
| options | [TemplateOptions](./foundation-login.templateoptions.md) | |
|
|
18
|
-
|
|
19
|
-
**Returns:**
|
|
20
|
-
|
|
21
|
-
import("@microsoft/fast-element").ElementStyles
|
|
22
|
-
|
|
23
13
|
## Example
|
|
24
14
|
|
|
25
15
|
unknown target
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[Home](./index.md) > [@genesislcap/foundation-login](./foundation-login.md) > [template](./foundation-login.template.md)
|
|
4
4
|
|
|
5
|
-
## template
|
|
5
|
+
## template variable
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
**Signature:**
|
|
@@ -10,14 +10,3 @@
|
|
|
10
10
|
```typescript
|
|
11
11
|
template: (options: TemplateOptions) => import("@microsoft/fast-element").ViewTemplate<Login, any>
|
|
12
12
|
```
|
|
13
|
-
|
|
14
|
-
## Parameters
|
|
15
|
-
|
|
16
|
-
| Parameter | Type | Description |
|
|
17
|
-
| --- | --- | --- |
|
|
18
|
-
| options | [TemplateOptions](./foundation-login.templateoptions.md) | |
|
|
19
|
-
|
|
20
|
-
**Returns:**
|
|
21
|
-
|
|
22
|
-
import("@microsoft/fast-element").ViewTemplate<[Login](./foundation-login.login.md)<!-- -->, any>
|
|
23
|
-
|
|
@@ -7,20 +7,18 @@
|
|
|
7
7
|
import { Auth } from '@genesislcap/foundation-comms';
|
|
8
8
|
import { Binding } from '@microsoft/fast-element';
|
|
9
9
|
import { Connect } from '@genesislcap/foundation-comms';
|
|
10
|
-
import { Constructable } from '@microsoft/fast-element';
|
|
11
10
|
import { Container } from '@microsoft/fast-foundation';
|
|
12
11
|
import { CredentialManager } from '@genesislcap/foundation-comms';
|
|
13
12
|
import { DefineFunction } from '@genesislcap/foundation-ui';
|
|
14
13
|
import { ElementStyles } from '@microsoft/fast-element';
|
|
15
14
|
import { FASTElement } from '@microsoft/fast-element';
|
|
16
|
-
import {
|
|
15
|
+
import { FoundationRouterConfiguration } from '@genesislcap/foundation-ui';
|
|
17
16
|
import { I18next } from '@genesislcap/foundation-i18n';
|
|
18
17
|
import { I18nextConfig } from '@genesislcap/foundation-i18n';
|
|
19
18
|
import { InterfaceSymbol } from '@microsoft/fast-foundation';
|
|
20
19
|
import { Message } from '@genesislcap/foundation-comms';
|
|
21
20
|
import { MessageBuilder } from '@genesislcap/foundation-comms';
|
|
22
21
|
import { PartialFASTElementDefinition } from '@microsoft/fast-element';
|
|
23
|
-
import { RouterConfiguration } from '@microsoft/fast-router';
|
|
24
22
|
import { Session } from '@genesislcap/foundation-comms';
|
|
25
23
|
import { SyntheticViewTemplate } from '@microsoft/fast-element';
|
|
26
24
|
import { TemplateElementDependency } from '@genesislcap/foundation-ui';
|
|
@@ -61,8 +59,6 @@ export class BaseRoute extends ConfigHostElement {
|
|
|
61
59
|
// (undocumented)
|
|
62
60
|
ensureConnection(): Promise<boolean>;
|
|
63
61
|
// (undocumented)
|
|
64
|
-
getSubRoutePath(routeName: Routes | string): string;
|
|
65
|
-
// (undocumented)
|
|
66
62
|
hasErrors: boolean;
|
|
67
63
|
// (undocumented)
|
|
68
64
|
host: string;
|
|
@@ -75,7 +71,7 @@ export class BaseRoute extends ConfigHostElement {
|
|
|
75
71
|
// (undocumented)
|
|
76
72
|
onBack: () => void;
|
|
77
73
|
// (undocumented)
|
|
78
|
-
onNavigate: (
|
|
74
|
+
onNavigate: (routeName: Routes, params?: Object, trigger?: boolean) => void;
|
|
79
75
|
// (undocumented)
|
|
80
76
|
onSubmit(): Promise<void>;
|
|
81
77
|
// (undocumented)
|
|
@@ -316,12 +312,10 @@ export class LogoElement extends ConfigHostElement {
|
|
|
316
312
|
// Warning: (ae-internal-missing-underscore) The name "MainRouterConfig" should be prefixed with an underscore because the declaration is marked as @internal
|
|
317
313
|
//
|
|
318
314
|
// @internal
|
|
319
|
-
export class MainRouterConfig extends
|
|
320
|
-
constructor(auth: Auth,
|
|
315
|
+
export class MainRouterConfig extends FoundationRouterConfiguration<Settings> {
|
|
316
|
+
constructor(auth: Auth, loginConfig?: LoginConfig);
|
|
321
317
|
// (undocumented)
|
|
322
318
|
configure(): void;
|
|
323
|
-
// (undocumented)
|
|
324
|
-
construct<T>(Type: Constructable<T>): T;
|
|
325
319
|
}
|
|
326
320
|
|
|
327
321
|
// @public (undocumented)
|
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.226.0",
|
|
4
|
+
"version": "14.226.2-alpha-bcda968.0",
|
|
5
5
|
"license": "SEE LICENSE IN license.txt",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
7
7
|
"types": "dist/foundation-login.d.ts",
|
|
@@ -67,29 +67,29 @@
|
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@genesislcap/foundation-testing": "14.226.0",
|
|
71
|
-
"@genesislcap/genx": "14.226.0",
|
|
72
|
-
"@genesislcap/rollup-builder": "14.226.0",
|
|
73
|
-
"@genesislcap/ts-builder": "14.226.0",
|
|
74
|
-
"@genesislcap/uvu-playwright-builder": "14.226.0",
|
|
75
|
-
"@genesislcap/vite-builder": "14.226.0",
|
|
76
|
-
"@genesislcap/webpack-builder": "14.226.0",
|
|
70
|
+
"@genesislcap/foundation-testing": "14.226.2-alpha-bcda968.0",
|
|
71
|
+
"@genesislcap/genx": "14.226.2-alpha-bcda968.0",
|
|
72
|
+
"@genesislcap/rollup-builder": "14.226.2-alpha-bcda968.0",
|
|
73
|
+
"@genesislcap/ts-builder": "14.226.2-alpha-bcda968.0",
|
|
74
|
+
"@genesislcap/uvu-playwright-builder": "14.226.2-alpha-bcda968.0",
|
|
75
|
+
"@genesislcap/vite-builder": "14.226.2-alpha-bcda968.0",
|
|
76
|
+
"@genesislcap/webpack-builder": "14.226.2-alpha-bcda968.0",
|
|
77
77
|
"rimraf": "^5.0.0"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@genesislcap/foundation-comms": "14.226.0",
|
|
81
|
-
"@genesislcap/foundation-i18n": "14.226.0",
|
|
82
|
-
"@genesislcap/foundation-logger": "14.226.0",
|
|
83
|
-
"@genesislcap/foundation-ui": "14.226.0",
|
|
84
|
-
"@genesislcap/foundation-utils": "14.226.0",
|
|
85
|
-
"@genesislcap/foundation-zero": "14.226.0",
|
|
80
|
+
"@genesislcap/foundation-comms": "14.226.2-alpha-bcda968.0",
|
|
81
|
+
"@genesislcap/foundation-i18n": "14.226.2-alpha-bcda968.0",
|
|
82
|
+
"@genesislcap/foundation-logger": "14.226.2-alpha-bcda968.0",
|
|
83
|
+
"@genesislcap/foundation-ui": "14.226.2-alpha-bcda968.0",
|
|
84
|
+
"@genesislcap/foundation-utils": "14.226.2-alpha-bcda968.0",
|
|
85
|
+
"@genesislcap/foundation-zero": "14.226.2-alpha-bcda968.0",
|
|
86
86
|
"@microsoft/fast-components": "2.30.6",
|
|
87
87
|
"@microsoft/fast-element": "1.14.0",
|
|
88
88
|
"@microsoft/fast-foundation": "2.49.6",
|
|
89
89
|
"@microsoft/fast-router": "0.4.8",
|
|
90
90
|
"@microsoft/fast-web-utilities": "5.4.1",
|
|
91
91
|
"lodash": "^4.17.21",
|
|
92
|
-
"tslib": "2.
|
|
92
|
+
"tslib": "^2.3.1"
|
|
93
93
|
},
|
|
94
94
|
"repository": {
|
|
95
95
|
"type": "git",
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"access": "public"
|
|
101
101
|
},
|
|
102
102
|
"customElements": "dist/custom-elements.json",
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "9af9df8ba21d267f9bb916dcdc29796cd9f3e007"
|
|
104
104
|
}
|