@genesislcap/foundation-login 9.0.1-alpha-b5c5eb7.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/README.md +160 -0
- package/dist/1.0.0.remoteEntry.js +1 -0
- package/dist/15.15.b20930426d82ddb7bd44.js +1322 -0
- package/dist/15.1f4ec0deba9aca7499d56c621e06b130.js.map +1 -0
- package/dist/170.170.f64459527c9480c31e74.js +726 -0
- package/dist/170.a9086b342b886f13162e76944c6232ea.js.map +1 -0
- package/dist/176.176.bfbfc60ffad852c406c4.js +2 -0
- package/dist/176.7ce7d4e386b9ebd99f2a121d6364c1ad.js.map +1 -0
- package/dist/185.185.c56719990d52bcca8549.js +2 -0
- package/dist/185.d623d7c2df70c9d665343444e7c1fa6c.js.map +1 -0
- package/dist/338.338.e399ff6c11eb8175de4c.js +2 -0
- package/dist/338.4f68feefeaca1bf1dbc7ba12af2e84aa.js.map +1 -0
- package/dist/397.397.22e0364e0ff35fdfe9a0.js +3 -0
- package/dist/397.397.22e0364e0ff35fdfe9a0.js.LICENSE.txt +1 -0
- package/dist/397.629a215804364ccc7763bc046dbea3d5.js.map +1 -0
- package/dist/419.419.00fda3874a096d8457d8.js +2136 -0
- package/dist/419.b6fb3444f7d56877c3a81cba8eaca942.js.map +1 -0
- package/dist/453.3c9a25d2af3ccf8232fdd1dfc5244b3d.js.map +1 -0
- package/dist/453.453.14247e88aa4df78dca2c.js +2 -0
- package/dist/726.4c7419d8edb8ba5e67699f4820c8c461.js.map +1 -0
- package/dist/726.726.e09fed9a1e3b529acd46.js +3 -0
- package/dist/726.726.e09fed9a1e3b529acd46.js.LICENSE.txt +4 -0
- package/dist/741.741.d84fc7e9236cae1acc99.js +3 -0
- package/dist/741.741.d84fc7e9236cae1acc99.js.LICENSE.txt +4 -0
- package/dist/741.a3dfed45252169e53ee396a8b76cea67.js.map +1 -0
- package/dist/b634d7e1f2324faf1230.svg +10 -0
- package/dist/c0bd2c45d93ce443d624.jpg +0 -0
- package/dist/dashboard.json +1 -0
- package/dist/dts/components/components.d.ts +5 -0
- package/dist/dts/components/components.d.ts.map +1 -0
- package/dist/dts/components/index.d.ts +2 -0
- package/dist/dts/components/index.d.ts.map +1 -0
- package/dist/dts/index.d.ts +3 -0
- package/dist/dts/index.d.ts.map +1 -0
- package/dist/dts/index.federated.d.ts +1 -0
- package/dist/dts/index.federated.d.ts.map +1 -0
- package/dist/dts/layouts/default.d.ts +3 -0
- package/dist/dts/layouts/default.d.ts.map +1 -0
- package/dist/dts/layouts/index.d.ts +2 -0
- package/dist/dts/layouts/index.d.ts.map +1 -0
- package/dist/dts/main/config.d.ts +261 -0
- package/dist/dts/main/config.d.ts.map +1 -0
- package/dist/dts/main/define.d.ts +29 -0
- package/dist/dts/main/define.d.ts.map +1 -0
- package/dist/dts/main/index.d.ts +7 -0
- package/dist/dts/main/index.d.ts.map +1 -0
- package/dist/dts/main/main.d.ts +179 -0
- package/dist/dts/main/main.d.ts.map +1 -0
- package/dist/dts/main/main.definition.d.ts +48 -0
- package/dist/dts/main/main.definition.d.ts.map +1 -0
- package/dist/dts/main/main.styles.d.ts +13 -0
- package/dist/dts/main/main.styles.d.ts.map +1 -0
- package/dist/dts/main/main.template.d.ts +7 -0
- package/dist/dts/main/main.template.d.ts.map +1 -0
- package/dist/dts/routes/base.d.ts +127 -0
- package/dist/dts/routes/base.d.ts.map +1 -0
- package/dist/dts/routes/config.d.ts +27 -0
- package/dist/dts/routes/config.d.ts.map +1 -0
- package/dist/dts/routes/forgot-password/forgot-password.d.ts +6 -0
- package/dist/dts/routes/forgot-password/forgot-password.d.ts.map +1 -0
- package/dist/dts/routes/forgot-password/forgot-password.template.d.ts +3 -0
- package/dist/dts/routes/forgot-password/forgot-password.template.d.ts.map +1 -0
- package/dist/dts/routes/index.d.ts +4 -0
- package/dist/dts/routes/index.d.ts.map +1 -0
- package/dist/dts/routes/login-form/login-form.d.ts +27 -0
- package/dist/dts/routes/login-form/login-form.d.ts.map +1 -0
- package/dist/dts/routes/login-form/login-form.styles.d.ts +2 -0
- package/dist/dts/routes/login-form/login-form.styles.d.ts.map +1 -0
- package/dist/dts/routes/login-form/login-form.template.d.ts +3 -0
- package/dist/dts/routes/login-form/login-form.template.d.ts.map +1 -0
- package/dist/dts/routes/not-found/not-found.d.ts +4 -0
- package/dist/dts/routes/not-found/not-found.d.ts.map +1 -0
- package/dist/dts/routes/protected/protected.d.ts +5 -0
- package/dist/dts/routes/protected/protected.d.ts.map +1 -0
- package/dist/dts/routes/protected/protected.template.d.ts +3 -0
- package/dist/dts/routes/protected/protected.template.d.ts.map +1 -0
- package/dist/dts/routes/request-account/request-account.d.ts +6 -0
- package/dist/dts/routes/request-account/request-account.d.ts.map +1 -0
- package/dist/dts/routes/request-account/request-account.template.d.ts +3 -0
- package/dist/dts/routes/request-account/request-account.template.d.ts.map +1 -0
- package/dist/dts/routes/reset-password/reset-password.d.ts +14 -0
- package/dist/dts/routes/reset-password/reset-password.d.ts.map +1 -0
- package/dist/dts/routes/reset-password/reset-password.template.d.ts +3 -0
- package/dist/dts/routes/reset-password/reset-password.template.d.ts.map +1 -0
- package/dist/dts/routes/types.d.ts +29 -0
- package/dist/dts/routes/types.d.ts.map +1 -0
- package/dist/dts/routes/verify/verify.d.ts +6 -0
- package/dist/dts/routes/verify/verify.d.ts.map +1 -0
- package/dist/dts/routes/verify/verify.template.d.ts +3 -0
- package/dist/dts/routes/verify/verify.template.d.ts.map +1 -0
- package/dist/dts/styles/index.d.ts +3 -0
- package/dist/dts/styles/index.d.ts.map +1 -0
- package/dist/dts/styles/styles.d.ts +5 -0
- package/dist/dts/styles/styles.d.ts.map +1 -0
- package/dist/dts/styles/typography.d.ts +4 -0
- package/dist/dts/styles/typography.d.ts.map +1 -0
- package/dist/dts/utils/index.d.ts +2 -0
- package/dist/dts/utils/index.d.ts.map +1 -0
- package/dist/dts/utils/logger.d.ts +2 -0
- package/dist/dts/utils/logger.d.ts.map +1 -0
- package/dist/esm/assets/bg.jpg +0 -0
- package/dist/esm/assets/genesis-logo-dark.svg +32 -0
- package/dist/esm/assets/genesis-logo-light.svg +10 -0
- package/dist/esm/assets/genesis-logo-old.svg +36 -0
- package/dist/esm/components/components.js +49 -0
- package/dist/esm/components/components.js.map +1 -0
- package/dist/esm/components/index.js +2 -0
- package/dist/esm/components/index.js.map +1 -0
- package/dist/esm/index.federated.js +2 -0
- package/dist/esm/index.federated.js.map +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/layouts/default.js +28 -0
- package/dist/esm/layouts/default.js.map +1 -0
- package/dist/esm/layouts/index.js +2 -0
- package/dist/esm/layouts/index.js.map +1 -0
- package/dist/esm/main/config.js +153 -0
- package/dist/esm/main/config.js.map +1 -0
- package/dist/esm/main/define.js +31 -0
- package/dist/esm/main/define.js.map +1 -0
- package/dist/esm/main/index.js +7 -0
- package/dist/esm/main/index.js.map +1 -0
- package/dist/esm/main/main.definition.js +44 -0
- package/dist/esm/main/main.definition.js.map +1 -0
- package/dist/esm/main/main.js +234 -0
- package/dist/esm/main/main.js.map +1 -0
- package/dist/esm/main/main.styles.js +39 -0
- package/dist/esm/main/main.styles.js.map +1 -0
- package/dist/esm/main/main.template.js +15 -0
- package/dist/esm/main/main.template.js.map +1 -0
- package/dist/esm/routes/base.js +512 -0
- package/dist/esm/routes/base.js.map +1 -0
- package/dist/esm/routes/config.js +169 -0
- package/dist/esm/routes/config.js.map +1 -0
- package/dist/esm/routes/forgot-password/forgot-password.js +42 -0
- package/dist/esm/routes/forgot-password/forgot-password.js.map +1 -0
- package/dist/esm/routes/forgot-password/forgot-password.template.js +27 -0
- package/dist/esm/routes/forgot-password/forgot-password.template.js.map +1 -0
- package/dist/esm/routes/index.js +4 -0
- package/dist/esm/routes/index.js.map +1 -0
- package/dist/esm/routes/login-form/login-form.js +256 -0
- package/dist/esm/routes/login-form/login-form.js.map +1 -0
- package/dist/esm/routes/login-form/login-form.styles.js +79 -0
- package/dist/esm/routes/login-form/login-form.styles.js.map +1 -0
- package/dist/esm/routes/login-form/login-form.template.js +162 -0
- package/dist/esm/routes/login-form/login-form.template.js.map +1 -0
- package/dist/esm/routes/not-found/not-found.js +17 -0
- package/dist/esm/routes/not-found/not-found.js.map +1 -0
- package/dist/esm/routes/protected/protected.js +26 -0
- package/dist/esm/routes/protected/protected.js.map +1 -0
- package/dist/esm/routes/protected/protected.template.js +14 -0
- package/dist/esm/routes/protected/protected.template.js.map +1 -0
- package/dist/esm/routes/request-account/request-account.js +33 -0
- package/dist/esm/routes/request-account/request-account.js.map +1 -0
- package/dist/esm/routes/request-account/request-account.template.js +38 -0
- package/dist/esm/routes/request-account/request-account.template.js.map +1 -0
- package/dist/esm/routes/reset-password/reset-password.js +79 -0
- package/dist/esm/routes/reset-password/reset-password.js.map +1 -0
- package/dist/esm/routes/reset-password/reset-password.template.js +31 -0
- package/dist/esm/routes/reset-password/reset-password.template.js.map +1 -0
- package/dist/esm/routes/types.js +2 -0
- package/dist/esm/routes/types.js.map +1 -0
- package/dist/esm/routes/verify/verify.js +33 -0
- package/dist/esm/routes/verify/verify.js.map +1 -0
- package/dist/esm/routes/verify/verify.template.js +39 -0
- package/dist/esm/routes/verify/verify.template.js.map +1 -0
- package/dist/esm/styles/index.js +3 -0
- package/dist/esm/styles/index.js.map +1 -0
- package/dist/esm/styles/styles.js +145 -0
- package/dist/esm/styles/styles.js.map +1 -0
- package/dist/esm/styles/typography.js +27 -0
- package/dist/esm/styles/typography.js.map +1 -0
- package/dist/esm/utils/index.js +2 -0
- package/dist/esm/utils/index.js.map +1 -0
- package/dist/esm/utils/logger.js +3 -0
- package/dist/esm/utils/logger.js.map +1 -0
- package/dist/favicon.ico +0 -0
- package/dist/foundation-login.api.json +1598 -0
- package/dist/foundation-login.d.ts +758 -0
- package/dist/foundationLogin.51f4a45f08e04c340be2f7a5a21d203d.js.map +1 -0
- package/dist/index.ejs +23 -0
- package/dist/index.html +10 -0
- package/dist/info.ejs +13 -0
- package/dist/info.html +22 -0
- package/dist/main.6b8ef32149fa7ade387e34be21e80e9f.js.map +1 -0
- package/dist/main.f20fa5670484f5c57ef1.js +2 -0
- package/dist/npm.analytics.343.1691cbc7d8a5badd3734.js +2 -0
- package/dist/npm.analytics.ce2eefcbb0dbd8ec610f4a90f48aa689.js.map +1 -0
- package/dist/npm.consola.713.661cb6ae3806c228029d.js +2 -0
- package/dist/npm.consola.96aceeeb14c801e429604b872dd754d7.js.map +1 -0
- package/dist/npm.dialog-polyfill.47.34b0c0d52e6712cf91bb.js +2 -0
- package/dist/npm.dialog-polyfill.9d605973cbc29184d8b9b4736433dddc.js.map +1 -0
- package/dist/npm.finos.690.d012d887fab1a50fd3fd.js +2 -0
- package/dist/npm.finos.bb7f5996c8be19fd2a1c0bb82b2512ef.js.map +1 -0
- package/dist/npm.fortawesome.104.f45009da0a55a389999c.js +2 -0
- package/dist/npm.fortawesome.e10775e8f8583851351996b12aec3dfb.js.map +1 -0
- package/dist/npm.microsoft.127.7781d48b93413319f199.js +6406 -0
- package/dist/npm.microsoft.127.7781d48b93413319f199.js.LICENSE.txt +14 -0
- package/dist/npm.microsoft.b0947aa2f980f173ee68c35127bf2481.js.map +1 -0
- package/dist/npm.popperjs.47700ec72e909558c6ebe29941887dcf.js.map +1 -0
- package/dist/npm.popperjs.591.6ab52bc8e177edef695a.js +2 -0
- package/dist/npm.rxjs.271.210fdd198235c86ce4cd.js +2 -0
- package/dist/npm.rxjs.36e7291df63583daef7bbafd0a3ab9dc.js.map +1 -0
- package/dist/remoteEntry.js +2 -0
- package/dist/serve.json +3 -0
- package/dist/tsdoc-metadata.json +11 -0
- package/docs/.gitattributes +2 -0
- package/docs/api/foundation-login.configure.md +62 -0
- package/docs/api/foundation-login.defaultapihost.md +12 -0
- package/docs/api/foundation-login.defaultloginconfig.md +13 -0
- package/docs/api/foundation-login.defaultorganisation.md +12 -0
- package/docs/api/foundation-login.defaultpassword.md +12 -0
- package/docs/api/foundation-login.defaultsocketext.md +12 -0
- package/docs/api/foundation-login.defaulttemplateoptions.md +16 -0
- package/docs/api/foundation-login.defaultuser.md +12 -0
- package/docs/api/foundation-login.define.md +38 -0
- package/docs/api/foundation-login.definition.md +19 -0
- package/docs/api/foundation-login.fieldconfig.md +16 -0
- package/docs/api/foundation-login.fieldconfigmap.md +19 -0
- package/docs/api/foundation-login.hostenv.md +12 -0
- package/docs/api/foundation-login.hosturl.md +12 -0
- package/docs/api/foundation-login.idp.id.md +11 -0
- package/docs/api/foundation-login.idp.md +20 -0
- package/docs/api/foundation-login.idp.type.md +11 -0
- package/docs/api/foundation-login.idpresponse.id.md +11 -0
- package/docs/api/foundation-login.idpresponse.md +20 -0
- package/docs/api/foundation-login.idpresponse.type.md +11 -0
- package/docs/api/foundation-login.ismfroute.md +24 -0
- package/docs/api/foundation-login.login.md +108 -0
- package/docs/api/foundation-login.loginconfig.autoauth.md +18 -0
- package/docs/api/foundation-login.loginconfig.autoconnect.md +13 -0
- package/docs/api/foundation-login.loginconfig.background.md +30 -0
- package/docs/api/foundation-login.loginconfig.defaultredirecturl.md +18 -0
- package/docs/api/foundation-login.loginconfig.fields.md +18 -0
- package/docs/api/foundation-login.loginconfig.logo.md +28 -0
- package/docs/api/foundation-login.loginconfig.md +30 -0
- package/docs/api/foundation-login.loginconfig.omitredirecturls.md +21 -0
- package/docs/api/foundation-login.loginconfig.omitroutes.md +25 -0
- package/docs/api/foundation-login.loginconfig.showconnectionindicator.md +13 -0
- package/docs/api/foundation-login.loginconfig.sso.md +18 -0
- package/docs/api/foundation-login.loginconfig.versioninformation.md +25 -0
- package/docs/api/foundation-login.loginhosted.md +23 -0
- package/docs/api/foundation-login.loginhosted.registercommoncomponents.md +18 -0
- package/docs/api/foundation-login.md +59 -0
- package/docs/api/foundation-login.routes.md +20 -0
- package/docs/api/foundation-login.settings.md +20 -0
- package/docs/api/foundation-login.ssoconfig.md +15 -0
- package/docs/api/foundation-login.styles.md +12 -0
- package/docs/api/foundation-login.template.md +12 -0
- package/docs/api/foundation-login.templatecomponents.md +25 -0
- package/docs/api/foundation-login.templateoptions.md +19 -0
- package/docs/api/index.md +12 -0
- package/docs/api-report.md +380 -0
- package/docs/img/foundation-login_change-password.png +0 -0
- package/docs/img/foundation-login_forgotten-password.png +0 -0
- package/docs/img/foundation-login_login-sso.png +0 -0
- package/docs/img/foundation-login_login-standard.png +0 -0
- package/docs/img/foundation-login_request-account.png +0 -0
- package/license.txt +46 -0
- package/package.json +90 -0
package/README.md
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Foundation Login
|
|
2
|
+
|
|
3
|
+
[API](./docs/api/index.md)
|
|
4
|
+
|
|
5
|
+
## Introduction
|
|
6
|
+
|
|
7
|
+
This micro front-end includes a set of identity management functions: authentication (including via SSO) and password reset, for example. Many of the features can be turned on and off as desired, and parts of the login screen (such as the logo) can be customised.
|
|
8
|
+
|
|
9
|
+
An example of the main login screen: <br/>
|
|
10
|
+

|
|
11
|
+
|
|
12
|
+
An example of authentication via SSO: <br/>
|
|
13
|
+

|
|
14
|
+
|
|
15
|
+
<!-- An example of the forgotten password screen: <br/>
|
|
16
|
+
 -->
|
|
17
|
+
|
|
18
|
+
An example of the change password screen: <br/>
|
|
19
|
+

|
|
20
|
+
|
|
21
|
+
<!-- An example of the request account screen: <br/>
|
|
22
|
+
 -->
|
|
23
|
+
|
|
24
|
+
## Login set-up
|
|
25
|
+
|
|
26
|
+
:::info
|
|
27
|
+
If you build a project upon one of the Genesis seed apps, then the `Login` micro front-end will already be set-up for you.
|
|
28
|
+
:::
|
|
29
|
+
|
|
30
|
+
To enable this micro front-end in your application, follow the steps below.
|
|
31
|
+
|
|
32
|
+
- Add `@genesislcap/foundation-login` as a dependency in your **package.json** file. Whenever you change the dependencies of your project, always you run the `$ npm run bootstrap` command again. You can see more information on the [package.json basics](https://docs.genesis.global/secure/web/micro-front-ends/foundation-login/) page.
|
|
33
|
+
|
|
34
|
+
```javascript
|
|
35
|
+
{
|
|
36
|
+
...
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@genesislcap/foundation-login": "latest"
|
|
39
|
+
},
|
|
40
|
+
...
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
:::note
|
|
45
|
+
This page assumes you're using the Routing systems that are part of `foundation-ui`, and will cover set-up as part of that routing system.
|
|
46
|
+
:::
|
|
47
|
+
|
|
48
|
+
- In the router configuration for your application, import the `Login` class and the `Settings` type. As shown in this example, you might want to import `Settings` with an alias to avoid name clashes.
|
|
49
|
+
|
|
50
|
+
```javascript
|
|
51
|
+
import { Login, Settings as LoginSettings } from '@genesislcap/foundation-login';
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
- Next you'll want to ensure that your router config uses your `LoginSettings` as its generic type so you can configure the login route.
|
|
55
|
+
```javascript
|
|
56
|
+
export class MainRouterConfig extends RouterConfiguration<LoginSettings> {
|
|
57
|
+
...
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
- Then add the required config to the router config that you use. For example, you'll want to set up the `Login` class to be used on the `/login` route, and pass in its required settings. See [customising login](#customising-login).
|
|
62
|
+
```javascript
|
|
63
|
+
{ path: '', redirect: 'login' },
|
|
64
|
+
{
|
|
65
|
+
path: 'login',
|
|
66
|
+
element: Login,
|
|
67
|
+
title: 'Login',
|
|
68
|
+
name: 'login',
|
|
69
|
+
layout: loginLayout,
|
|
70
|
+
// Login settings that are defined in the LoginSettings type
|
|
71
|
+
settings: {
|
|
72
|
+
defaultRedirectUrl: 'protected',
|
|
73
|
+
public: true,
|
|
74
|
+
resetPassword: true,
|
|
75
|
+
ssoToggle: true,
|
|
76
|
+
ssoEnable: false,
|
|
77
|
+
},
|
|
78
|
+
childRouters: true,
|
|
79
|
+
},
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
- You'll also want to set up things like the `NavigationContributor` in this class.
|
|
83
|
+
|
|
84
|
+
:::noteExample
|
|
85
|
+
An example of this and other required settings for the router configuration with regard to the login system can be found in the [example in the API reference](./docs/api/foundation-login.login/#example).
|
|
86
|
+
:::
|
|
87
|
+
|
|
88
|
+
- The functionality of the Login class is configured via the settings block on its route, but the other routes will also have customisation on them too. The main options to set here are:
|
|
89
|
+
|
|
90
|
+
- `allowAutoAuth` which will log the user back in onto the page when they navigate away if they already have an authenticated session
|
|
91
|
+
- `public` which will indicate that a route doesn't require the user to be authenticated to view
|
|
92
|
+
|
|
93
|
+
```javascript
|
|
94
|
+
{
|
|
95
|
+
path: 'admin',
|
|
96
|
+
element: Admin,
|
|
97
|
+
title: 'Admin',
|
|
98
|
+
name: 'admin',
|
|
99
|
+
settings: { allowAutoAuth: true },
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
path: 'info',
|
|
103
|
+
element: Info,
|
|
104
|
+
title: 'Info',
|
|
105
|
+
name: 'info',
|
|
106
|
+
settings: { public: true },
|
|
107
|
+
},
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
:::warningWarning
|
|
111
|
+
By default, a route that isn't marked public is not. However, a non-public route isn't going to block non-authenticated users automatically from viewing them. This must be impelmented in the `NavigationContributor`, as shown in the [previously mentioned example](./docs/api/foundation-login.login/#example).
|
|
112
|
+
:::
|
|
113
|
+
|
|
114
|
+
## Authentication
|
|
115
|
+
|
|
116
|
+
For authentication, most configuration is set in the back end. You should familiarise yourself with the [authentication section of the back-end](docs/03_server/05_access-control/01_introduction.md).
|
|
117
|
+
|
|
118
|
+
### Username & password
|
|
119
|
+
|
|
120
|
+
The standard authentication method is the user supplying their username and password. Even when SSO is enabled as an authentication method, the user will still have the option to sign in with their normal credentials.
|
|
121
|
+
|
|
122
|
+
:::noteTip
|
|
123
|
+
Setting the `DEFAULT_USER` and `DEFAULT_PASSWORD` environment variables will automatically populate the credentials in the login form, which can be useful during development so developers don't need to write out their credentials continuously.
|
|
124
|
+
:::
|
|
125
|
+
|
|
126
|
+
### SSO
|
|
127
|
+
|
|
128
|
+
SSO functionality allows the `Login` micro front-end to work with your company's existing authentication system, enabling them to have a single set of credentials - incluidng those built on the Genesis low-code platform. Genesis supports SSO with both JWT and SAML.
|
|
129
|
+
|
|
130
|
+
Setting up SSO is primarily [a back-end task](docs/03_server/05_access-control/04_sso_authentication.md); however, there is a small amount of configuration covered in [the customisation part of this documentation](#enable-sso).
|
|
131
|
+
|
|
132
|
+
:::noteInfo
|
|
133
|
+
The standard process of SSO is that the SSO authentication provider flow is opened via a redirect in the current page. However, many authentication providers block their system when running in an iframe to prevent [clickjacking attacks](https://owasp.org/www-community/attacks/Clickjacking). Because of this, if the `Login` micro front-end detects that it is running in an iframe, it opens up the authentication provider in a popup instead.
|
|
134
|
+
:::
|
|
135
|
+
|
|
136
|
+
## Customising login
|
|
137
|
+
|
|
138
|
+
The `Login` micro front-end uses a parameterless constructor. Therefore, the configuration needs to be set via the settings javascript object in the router, as shown in the [set-up step](#login-set-up). See the full [settings API here](./docs/api/foundation-login.settings/#remarks).
|
|
139
|
+
|
|
140
|
+
### Enabled functionality
|
|
141
|
+
|
|
142
|
+
In the [introduction section](#introduction), the reset password functionality is shown. However, this flow must be enabled with the `resetPassword` option.
|
|
143
|
+
|
|
144
|
+
### Logo
|
|
145
|
+
|
|
146
|
+
You will probably want to use your company's logo instead of the Genesis logo. A custom logo can be configured with the `logoSrc`, `logoWidth`, `logoHeight` settings. If you don't want to use a logo, you can instead hide the logo with `hideLogo`.
|
|
147
|
+
|
|
148
|
+
### Enable SSO
|
|
149
|
+
|
|
150
|
+
As mentioned in the [authentication](#sso) section, SSO must be configured on the server, but some front-end configuration is required too.
|
|
151
|
+
|
|
152
|
+
- Setting `ssoToggle` is required to enable the SSO authentication as an option for the user; the user can then enable that flow with a checkbox that controls `ssoEnable`.
|
|
153
|
+
- Enabling `ssoEnable` at the route-level sets the SSO flow to be the default.
|
|
154
|
+
|
|
155
|
+
- Finally, set `defaultRedirectUrl`, which controls where the `Login` micro front-end will take the user back to once they complete the SSO journey. For example, setting option to `/home` will take the user to the `/home` path if they successfully login via SSO.
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
## License
|
|
159
|
+
|
|
160
|
+
Note: this project provides front end dependencies and uses licensed components listed in the next section, thus licenses for those components are required during development. Contact [Genesis Global](https://genesis.global/contact-us/) for more details.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var foundationLogin;(()=>{"use strict";var e,t,r,n,o,a,i,f={8451:(e,t,r)=>{var n={"./index":()=>r.e(185).then((()=>()=>r(2185)))},o=(e,t)=>(r.R=t,t=r.o(n,e)?n[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),r.R=void 0,t),a=(e,t)=>{if(r.S){var n=r.S.default,o="default";if(n&&n!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return r.S[o]=e,r.I(o,t)}};r.d(t,{get:()=>o,init:()=>a})},8973:(e,t,r)=>{var n=new Error;e.exports=new Promise(((e,t)=>{if("undefined"!=typeof foundationZero)return e();r.l("http://localhost:4020/remoteEntry.js",(r=>{if("undefined"!=typeof foundationZero)return e();var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;n.message="Loading script failed.\n("+o+": "+a+")",n.name="ScriptExternalLoadError",n.type=o,n.request=a,t(n)}),"foundationZero")})).then((()=>foundationZero))}},s={};function l(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}},n=!0;try{f[e].call(r.exports,r,r.exports,l),n=!1}finally{n&&delete s[e]}return r.exports}l.m=f,l.c=s,e=[],l.O=(t,r,n,o)=>{if(!r){var a=1/0;for(d=0;d<e.length;d++){for(var[r,n,o]=e[d],i=!0,f=0;f<r.length;f++)(!1&o||a>=o)&&Object.keys(l.O).every((e=>l.O[e](r[f])))?r.splice(f--,1):(i=!1,o<a&&(a=o));if(i){e.splice(d--,1);var s=n();void 0!==s&&(t=s)}}return t}o=o||0;for(var d=e.length;d>0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[r,n,o]},l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,l.t=function(e,n){if(1&n&&(e=this(e)),8&n)return e;if("object"==typeof e&&e){if(4&n&&e.__esModule)return e;if(16&n&&"function"==typeof e.then)return e}var o=Object.create(null);l.r(o);var a={};t=t||[null,r({}),r([]),r(r)];for(var i=2&n&&e;"object"==typeof i&&!~t.indexOf(i);i=r(i))Object.getOwnPropertyNames(i).forEach((t=>a[t]=()=>e[t]));return a.default=()=>e,l.d(o,a),o},l.d=(e,t)=>{for(var r in t)l.o(t,r)&&!l.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},l.f={},l.e=e=>Promise.all(Object.keys(l.f).reduce(((t,r)=>(l.f[r](e,t),t)),[])),l.u=e=>(({47:"npm.dialog-polyfill",104:"npm.fortawesome",127:"npm.microsoft",271:"npm.rxjs",343:"npm.analytics",591:"npm.popperjs",690:"npm.finos",713:"npm.consola"}[e]||e)+"."+e+"."+{15:"b20930426d82ddb7bd44",47:"34b0c0d52e6712cf91bb",104:"f45009da0a55a389999c",127:"7781d48b93413319f199",170:"f64459527c9480c31e74",176:"bfbfc60ffad852c406c4",185:"c56719990d52bcca8549",186:"576eb660911ab7c927c0",271:"210fdd198235c86ce4cd",273:"6d0d6d9689148d23e657",297:"839d1cb90e202c12cd73",324:"2619ca091ddbab803f20",338:"e399ff6c11eb8175de4c",343:"1691cbc7d8a5badd3734",373:"960895be4ba9b85f6c55",397:"22e0364e0ff35fdfe9a0",398:"47e0eb31700ff12e050f",419:"00fda3874a096d8457d8",453:"14247e88aa4df78dca2c",591:"6ab52bc8e177edef695a",617:"56805ebf6a4d3483cfa1",690:"d012d887fab1a50fd3fd",691:"7d59d1da3a0f5a40c383",711:"4baf5d15121e7a43019c",713:"661cb6ae3806c228029d",726:"e09fed9a1e3b529acd46",741:"d84fc7e9236cae1acc99",904:"3ad1d703cdc65387e21d",993:"cd3c9bdbc302e26a3ad6"}[e]+".js"),l.miniCssF=e=>{},l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},o="@genesislcap/foundation-login:",l.l=(e,t,r,a)=>{if(n[e])n[e].push(t);else{var i,f;if(void 0!==r)for(var s=document.getElementsByTagName("script"),d=0;d<s.length;d++){var u=s[d];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==o+r){i=u;break}}i||(f=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,l.nc&&i.setAttribute("nonce",l.nc),i.setAttribute("data-webpack",o+r),i.src=e),n[e]=[t];var c=(t,r)=>{i.onerror=i.onload=null,clearTimeout(p);var o=n[e];if(delete n[e],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((e=>e(r))),t)return t(r)},p=setTimeout(c.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=c.bind(null,i.onerror),i.onload=c.bind(null,i.onload),f&&document.head.appendChild(i)}},l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a={993:[2993]},i={2993:["default","./ZeroDesignSystem",8973]},l.f.remotes=(e,t)=>{l.o(a,e)&&a[e].forEach((e=>{var r=l.R;r||(r=[]);var n=i[e];if(!(r.indexOf(n)>=0)){if(r.push(n),n.p)return t.push(n.p);var o=t=>{t||(t=new Error("Container missing")),"string"==typeof t.message&&(t.message+='\nwhile loading "'+n[1]+'" from '+n[2]),f[e]=()=>{throw t},n.p=0},a=(e,r,a,i,f,s)=>{try{var l=e(r,a);if(!l||!l.then)return f(l,i,s);var d=l.then((e=>f(e,i)),o);if(!s)return d;t.push(n.p=d)}catch(e){o(e)}},s=(e,t,o)=>a(t.get,n[1],r,0,d,o),d=t=>{n.p=1,f[e]=e=>{e.exports=t()}};a(l,n[2],0,0,((e,t,r)=>e?a(l.I,n[0],0,e,s,r):o()),1)}}))},(()=>{l.S={};var e={},t={};l.I=(r,n)=>{n||(n=[]);var o=t[r];if(o||(o=t[r]={}),!(n.indexOf(o)>=0)){if(n.push(o),e[r])return e[r];l.o(l.S,r)||(l.S[r]={});var a=l.S[r],i="@genesislcap/foundation-login",f=(e,t,r,n)=>{var o=a[e]=a[e]||{},f=o[t];(!f||!f.loaded&&(!n!=!f.eager?n:i>f.from))&&(o[t]={get:r,from:i,eager:!!n})},s=[];return"default"===r&&(f("@genesislcap/foundation-comms","9.0.0",(()=>Promise.all([l.e(271),l.e(690),l.e(343),l.e(273),l.e(373),l.e(398),l.e(904),l.e(397)]).then((()=>()=>l(4255))))),f("@genesislcap/foundation-ui","9.0.0",(()=>Promise.all([l.e(127),l.e(271),l.e(104),l.e(591),l.e(47),l.e(273),l.e(691),l.e(373),l.e(398),l.e(617),l.e(904),l.e(297),l.e(419)]).then((()=>()=>l(6419))))),f("@genesislcap/foundation-utils","9.0.0",(()=>Promise.all([l.e(713),l.e(273),l.e(373),l.e(398),l.e(617),l.e(453)]).then((()=>()=>l(2453))))),f("@genesislcap/foundation-zero","9.0.0",(()=>Promise.all([l.e(127),l.e(273),l.e(691),l.e(373),l.e(398),l.e(617),l.e(904),l.e(15),l.e(186)]).then((()=>()=>l(6015))))),f("@microsoft/fast-components","2.30.6",(()=>Promise.all([l.e(127),l.e(273),l.e(691),l.e(398),l.e(324)]).then((()=>()=>l(5043))))),f("@microsoft/fast-element","1.11.0",(()=>l.e(127).then((()=>()=>l(4179))))),f("@microsoft/fast-foundation","2.47.0",(()=>Promise.all([l.e(127),l.e(273),l.e(691),l.e(711),l.e(726)]).then((()=>()=>l(3963))))),f("@microsoft/fast-router","0.4.6",(()=>Promise.all([l.e(127),l.e(273),l.e(373)]).then((()=>()=>l(1879))))),f("@microsoft/fast-web-utilities","5.4.1",(()=>Promise.all([l.e(127),l.e(176)]).then((()=>()=>l(5514))))),f("tslib","1.14.1",(()=>l.e(127).then((()=>()=>l(7651))))),f("tslib","1.14.1",(()=>l.e(127).then((()=>()=>l(9040))))),f("tslib","2.5.0",(()=>l.e(338).then((()=>()=>l(8338))))),(e=>{var t=e=>{return t="Initialization of sharing external failed: "+e,"undefined"!=typeof console&&console.warn&&console.warn(t);var t};try{var o=l(8973);if(!o)return;var a=e=>e&&e.init&&e.init(l.S[r],n);if(o.then)return s.push(o.then(a,t));var i=a(o);if(i&&i.then)return s.push(i.catch(t))}catch(e){t(e)}})(8973)),s.length?e[r]=Promise.all(s).then((()=>e[r]=1)):e[r]=1}}})(),l.p="/",(()=>{var e=e=>{var t=e=>e.split(".").map((e=>+e==e?+e:e)),r=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=r[1]?t(r[1]):[];return r[2]&&(n.length++,n.push.apply(n,t(r[2]))),r[3]&&(n.push([]),n.push.apply(n,t(r[3]))),n},t=(t,r)=>{t=e(t),r=e(r);for(var n=0;;){if(n>=t.length)return n<r.length&&"u"!=(typeof r[n])[0];var o=t[n],a=(typeof o)[0];if(n>=r.length)return"u"==a;var i=r[n],f=(typeof i)[0];if(a!=f)return"o"==a&&"n"==f||"s"==f||"u"==a;if("o"!=a&&"u"!=a&&o!=i)return o<i;n++}},r=(t,n)=>{if(0 in t){n=e(n);var o=t[0],a=o<0;a&&(o=-o-1);for(var i=0,f=1,s=!0;;f++,i++){var l,d,u=f<t.length?(typeof t[f])[0]:"";if(i>=n.length||"o"==(d=(typeof(l=n[i]))[0]))return!s||("u"==u?f>o&&!a:""==u!=a);if("u"==d){if(!s||"u"!=u)return!1}else if(s)if(u==d)if(f<=o){if(l!=t[f])return!1}else{if(a?l>t[f]:l<t[f])return!1;l!=t[f]&&(s=!1)}else if("s"!=u&&"n"!=u){if(a||f<=o)return!1;s=!1,f--}else{if(f<=o||d<u!=a)return!1;s=!1}else"s"!=u&&"n"!=u&&(s=!1,f--)}}var c=[],p=c.pop.bind(c);for(i=1;i<t.length;i++){var h=t[i];c.push(1==h?p()|p():2==h?p()&p():h?r(h,n):!p())}return!!p()},n=(e,n,o)=>{var a=e[n];return(n=Object.keys(a).reduce(((e,n)=>!r(o,n)||e&&!t(e,n)?e:n),0))&&a[n]},o=(e=>function(t,r,n,o){var a=l.I(t);return a&&a.then?a.then(e.bind(e,t,l.S[t],r,n,o)):e(t,l.S[t],r,n,o)})(((e,t,r,o,a)=>{var i=t&&l.o(t,r)&&n(t,r,o);return i?(e=>(e.loaded=1,e.get()))(i):a()})),a={},i={1273:()=>o("default","@microsoft/fast-element",[1,1,7,0],(()=>l.e(127).then((()=>()=>l(4179))))),5373:()=>o("default","tslib",[1,2,3,1],(()=>l.e(338).then((()=>()=>l(8338))))),9398:()=>o("default","@microsoft/fast-foundation",[1,2,33,2],(()=>Promise.all([l.e(127),l.e(691),l.e(711),l.e(741)]).then((()=>()=>l(3963))))),5904:()=>o("default","@genesislcap/foundation-utils",[1,9,0,0],(()=>Promise.all([l.e(713),l.e(617),l.e(453)]).then((()=>()=>l(2453))))),9691:()=>o("default","@microsoft/fast-web-utilities",[1,5,0,2],(()=>Promise.all([l.e(127),l.e(176)]).then((()=>()=>l(5514))))),2617:()=>o("default","@microsoft/fast-components",[1,2,21,3],(()=>Promise.all([l.e(127),l.e(691),l.e(324)]).then((()=>()=>l(5043))))),7148:()=>o("default","@genesislcap/foundation-comms",[1,9,0,0],(()=>Promise.all([l.e(271),l.e(690),l.e(343),l.e(397)]).then((()=>()=>l(4255))))),1242:()=>o("default","@microsoft/fast-router",[2,0,4,2],(()=>l.e(127).then((()=>()=>l(1879))))),5186:()=>o("default","@genesislcap/foundation-ui",[1,9,0,0],(()=>Promise.all([l.e(127),l.e(271),l.e(104),l.e(591),l.e(47),l.e(297),l.e(419)]).then((()=>()=>l(6419))))),6324:()=>o("default","tslib",[1,2,3,1],(()=>l.e(127).then((()=>()=>l(7651))))),9711:()=>o("default","tslib",[1,2,3,1],(()=>l.e(127).then((()=>()=>l(9040))))),5264:()=>o("default","@genesislcap/foundation-zero",[1,9,0,0],(()=>Promise.all([l.e(127),l.e(15)]).then((()=>()=>l(6015)))))},f={170:[5264],186:[5186],273:[1273],297:[7148,1242],324:[6324],373:[5373],398:[9398],617:[2617],691:[9691],711:[9711],904:[5904]};l.f.consumes=(e,t)=>{l.o(f,e)&&f[e].forEach((e=>{if(l.o(a,e))return t.push(a[e]);var r=t=>{a[e]=0,l.m[e]=r=>{delete l.c[e],r.exports=t()}},n=t=>{delete a[e],l.m[e]=r=>{throw delete l.c[e],t}};try{var o=i[e]();o.then?t.push(a[e]=o.then(r).catch(n)):r(o)}catch(e){n(e)}}))}})(),(()=>{var e={770:0,671:0};l.f.j=(t,r)=>{var n=l.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else if(/^(3(24|73|98)|6(17|71|91)|186|273|297|711|904|993)$/.test(t))e[t]=0;else{var o=new Promise(((r,o)=>n=e[t]=[r,o]));r.push(n[2]=o);var a=l.p+l.u(t),i=new Error;l.l(a,(r=>{if(l.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;i.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",i.name="ChunkLoadError",i.type=o,i.request=a,n[1](i)}}),"chunk-"+t,t)}},l.O.j=t=>0===e[t];var t=(t,r)=>{var n,o,[a,i,f]=r,s=0;for(n in i)l.o(i,n)&&(l.m[n]=i[n]);if(f)var d=f(l);for(t&&t(r);s<a.length;s++)o=a[s],l.o(e,o)&&e[o]&&e[o][0](),e[a[s]]=0;return l.O(d)},r=self.webpackChunk_genesislcap_foundation_login=self.webpackChunk_genesislcap_foundation_login||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var d=l.O(void 0,[671],(()=>l(8451)));d=l.O(d),foundationLogin=d})();
|