@genesislcap/foundation-auth 14.71.1-auth-mf.6 → 14.71.1-auth-mf.10
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 +118 -10
- package/dist/dts/dto/EVENT_LOGIN_AUTH_ACK.d.ts +3 -0
- package/dist/dts/dto/EVENT_LOGIN_AUTH_ACK.d.ts.map +1 -1
- package/dist/dts/dto/EVENT_LOGIN_AUTH_NACK.d.ts +4 -0
- package/dist/dts/dto/EVENT_LOGIN_AUTH_NACK.d.ts.map +1 -1
- package/dist/dts/dto/MESSAGE.d.ts +2 -1
- package/dist/dts/dto/MESSAGE.d.ts.map +1 -1
- package/dist/dts/dto/MESSAGE_TYPE.d.ts +13 -0
- package/dist/dts/dto/MESSAGE_TYPE.d.ts.map +1 -0
- package/dist/dts/dto/index.d.ts +1 -0
- package/dist/dts/dto/index.d.ts.map +1 -1
- package/dist/dts/entity/index.d.ts +0 -1
- package/dist/dts/entity/index.d.ts.map +1 -1
- package/dist/dts/entity/loginAck.d.ts +0 -3
- package/dist/dts/entity/loginAck.d.ts.map +1 -1
- package/dist/dts/entity/loginNack.d.ts +1 -0
- package/dist/dts/entity/loginNack.d.ts.map +1 -1
- package/dist/dts/entity/message.d.ts +2 -1
- package/dist/dts/entity/message.d.ts.map +1 -1
- package/dist/dts/env.d.ts +15 -0
- package/dist/dts/env.d.ts.map +1 -1
- package/dist/dts/index.d.ts +2 -0
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/logout/index.d.ts +2 -0
- package/dist/dts/logout/index.d.ts.map +1 -0
- package/dist/dts/logout/logout.d.ts +31 -0
- package/dist/dts/logout/logout.d.ts.map +1 -0
- package/dist/dts/machine/machine.d.ts +24 -10
- package/dist/dts/machine/machine.d.ts.map +1 -1
- package/dist/dts/machine/types.d.ts +67 -18
- package/dist/dts/machine/types.d.ts.map +1 -1
- package/dist/dts/main/config.d.ts +18 -9
- package/dist/dts/main/config.d.ts.map +1 -1
- package/dist/dts/main/main.d.ts +2 -28
- package/dist/dts/main/main.d.ts.map +1 -1
- package/dist/dts/mapper/error.d.ts +14 -0
- package/dist/dts/mapper/error.d.ts.map +1 -0
- package/dist/dts/mapper/loginMapper.d.ts.map +1 -1
- package/dist/dts/mapper/logoutMapper.d.ts.map +1 -1
- package/dist/dts/mapper/map.d.ts +69 -0
- package/dist/dts/mapper/map.d.ts.map +1 -0
- package/dist/dts/mapper/messageMapper.d.ts +29 -0
- package/dist/dts/mapper/messageMapper.d.ts.map +1 -0
- package/dist/dts/mapper/types.d.ts +15 -2
- package/dist/dts/mapper/types.d.ts.map +1 -1
- package/dist/dts/mapper/utils.d.ts +6 -0
- package/dist/dts/mapper/utils.d.ts.map +1 -1
- package/dist/dts/routes/base.d.ts +14 -63
- package/dist/dts/routes/base.d.ts.map +1 -1
- package/dist/dts/routes/config.d.ts +1 -1
- package/dist/dts/routes/config.d.ts.map +1 -1
- package/dist/dts/routes/forgot-password/forgot-password.template.d.ts.map +1 -1
- package/dist/dts/routes/login/login.d.ts +4 -9
- package/dist/dts/routes/login/login.d.ts.map +1 -1
- package/dist/dts/routes/login/login.template.d.ts.map +1 -1
- package/dist/dts/routes/logout/logout.d.ts +6 -0
- package/dist/dts/routes/logout/logout.d.ts.map +1 -0
- package/dist/dts/routes/logout/logout.styles.d.ts +2 -0
- package/dist/dts/routes/logout/logout.styles.d.ts.map +1 -0
- package/dist/dts/routes/logout/logout.template.d.ts +3 -0
- package/dist/dts/routes/logout/logout.template.d.ts.map +1 -0
- package/dist/dts/routes/protected/protected.d.ts +2 -0
- package/dist/dts/routes/protected/protected.d.ts.map +1 -1
- package/dist/dts/routes/protected/protected.template.d.ts.map +1 -1
- package/dist/dts/routes/request-account/request-account.d.ts.map +1 -1
- package/dist/dts/routes/request-account/request-account.template.d.ts.map +1 -1
- package/dist/dts/routes/reset-password/reset-password.d.ts +0 -2
- package/dist/dts/routes/reset-password/reset-password.d.ts.map +1 -1
- package/dist/dts/routes/reset-password/reset-password.template.d.ts.map +1 -1
- package/dist/dts/routes/verify/verify.template.d.ts.map +1 -1
- package/dist/dts/store/auth.d.ts +13 -7
- package/dist/dts/store/auth.d.ts.map +1 -1
- package/dist/dts/user/config.d.ts +29 -0
- package/dist/dts/user/config.d.ts.map +1 -0
- package/dist/dts/user/index.d.ts +3 -0
- package/dist/dts/user/index.d.ts.map +1 -0
- package/dist/dts/{entity → user}/user.d.ts +11 -15
- package/dist/dts/user/user.d.ts.map +1 -0
- package/dist/esm/dto/MESSAGE_TYPE.js +13 -0
- package/dist/esm/dto/index.js +1 -1
- package/dist/esm/entity/index.js +0 -1
- package/dist/esm/env.js +43 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/logout/index.js +1 -0
- package/dist/esm/logout/logout.js +31 -0
- package/dist/esm/machine/machine.js +383 -216
- package/dist/esm/machine/types.js +23 -4
- package/dist/esm/main/config.js +15 -6
- package/dist/esm/main/main.js +1 -71
- package/dist/esm/mapper/error.js +17 -0
- package/dist/esm/mapper/loginMapper.js +11 -9
- package/dist/esm/mapper/logoutMapper.js +7 -5
- package/dist/esm/mapper/map.js +73 -0
- package/dist/esm/mapper/messageMapper.js +37 -0
- package/dist/esm/mapper/types.js +1 -1
- package/dist/esm/mapper/utils.js +9 -0
- package/dist/esm/routes/base.js +30 -133
- package/dist/esm/routes/config.js +11 -9
- package/dist/esm/routes/forgot-password/forgot-password.js +4 -7
- package/dist/esm/routes/forgot-password/forgot-password.template.js +1 -4
- package/dist/esm/routes/login/login.js +8 -68
- package/dist/esm/routes/login/login.template.js +1 -27
- package/dist/esm/routes/logout/logout.js +23 -0
- package/dist/esm/routes/logout/logout.styles.js +5 -0
- package/dist/esm/routes/logout/logout.template.js +13 -0
- package/dist/esm/routes/protected/protected.js +7 -0
- package/dist/esm/routes/protected/protected.template.js +6 -0
- package/dist/esm/routes/request-account/request-account.js +1 -5
- package/dist/esm/routes/request-account/request-account.template.js +3 -7
- package/dist/esm/routes/reset-password/reset-password.js +12 -26
- package/dist/esm/routes/reset-password/reset-password.template.js +1 -4
- package/dist/esm/routes/verify/verify.js +2 -5
- package/dist/esm/routes/verify/verify.template.js +3 -7
- package/dist/esm/store/auth.js +14 -5
- package/dist/esm/user/config.js +17 -0
- package/dist/esm/user/index.js +2 -0
- package/dist/esm/{entity → user}/user.js +14 -20
- package/dist/foundation-auth.api.json +1530 -722
- package/dist/foundation-auth.d.ts +294 -139
- package/docs/api/foundation-auth.auth.md +0 -8
- package/docs/api/foundation-auth.authconfig.feedbackdelay.md +18 -0
- package/docs/api/foundation-auth.authconfig.md +1 -1
- package/docs/api/foundation-auth.autheventmap.md +5 -3
- package/docs/api/{foundation-auth.authmachinecontext.authdto.md → foundation-auth.authmachinecontext.dto.md} +3 -3
- package/docs/api/{foundation-auth.authmachinecontext.authentity.md → foundation-auth.authmachinecontext.entity.md} +3 -3
- package/docs/api/foundation-auth.authmachinecontext.md +3 -4
- package/docs/api/{foundation-auth.authmachinecontext.mapper.md → foundation-auth.authmachinecontext.params.md} +4 -4
- package/docs/api/foundation-auth.authmachineevent.md +8 -6
- package/docs/api/foundation-auth.authmachineeventparams.md +15 -0
- package/docs/api/foundation-auth.authmessagemapperlookup.md +22 -0
- package/docs/api/foundation-auth.authstore.md +3 -1
- package/docs/api/foundation-auth.authstore.onchangepassword.md +22 -0
- package/docs/api/foundation-auth.authstore.onforgotpassword.md +22 -0
- package/docs/api/foundation-auth.authstore.onlogin.md +2 -2
- package/docs/api/{foundation-auth.authstore.onlogindetails.md → foundation-auth.authstore.onresetpassword.md} +4 -4
- package/docs/api/{foundation-auth.user.sessionid.md → foundation-auth.change_password_url.md} +4 -3
- package/docs/api/foundation-auth.changepasswordparams.md +17 -0
- package/docs/api/foundation-auth.configure.md +2 -4
- package/docs/api/foundation-auth.defaultauthmachine._constructor_.md +3 -4
- package/docs/api/foundation-auth.defaultauthmachine.captureauthqueryparams.md +15 -0
- package/docs/api/foundation-auth.defaultauthmachine.convertqueryparamstologinparams.md +22 -0
- package/docs/api/foundation-auth.defaultauthmachine.createfetchmachineevent.md +1 -1
- package/docs/api/foundation-auth.defaultauthmachine.md +11 -3
- package/docs/api/foundation-auth.defaultauthmachine.ondonedto.md +14 -0
- package/docs/api/foundation-auth.defaultauthmachine.onidleevents.md +28 -0
- package/docs/api/foundation-auth.defaultauthstore.md +3 -1
- package/docs/api/foundation-auth.defaultauthstore.onchangepassword.md +11 -0
- package/docs/api/foundation-auth.defaultauthstore.onforgotpassword.md +11 -0
- package/docs/api/{foundation-auth.defaultauthstore.onlogindetails.md → foundation-auth.defaultauthstore.onresetpassword.md} +3 -3
- package/docs/api/foundation-auth.defaultlogoututility.md +21 -0
- package/docs/api/foundation-auth.defaultlogoututility.run.md +15 -0
- package/docs/api/{foundation-auth.defaultuser.sessionid.md → foundation-auth.defaultuser.config.md} +3 -3
- package/docs/api/foundation-auth.defaultuser.isanonymous.md +2 -6
- package/docs/api/foundation-auth.defaultuser.isauthenticated.md +2 -6
- package/docs/api/foundation-auth.defaultuser.trackpath.md +1 -8
- package/docs/api/foundation-auth.defaultuserconfig.md +13 -0
- package/docs/api/foundation-auth.event_login_auth_ack.md +1 -1
- package/docs/api/foundation-auth.event_login_auth_ack.session_auth_token.md +2 -0
- package/docs/api/foundation-auth.event_login_auth_nack.md +6 -0
- package/docs/api/foundation-auth.event_login_auth_nack.refresh_auth_token.md +13 -0
- package/docs/api/foundation-auth.forgot_password_url.md +12 -0
- package/docs/api/foundation-auth.forgotpasswordparams.md +16 -0
- package/docs/api/foundation-auth.getsubroutepath.md +25 -0
- package/docs/api/foundation-auth.isloginparams.md +24 -0
- package/docs/api/foundation-auth.isnackdto.md +24 -0
- package/docs/api/foundation-auth.isqueryparams.md +24 -0
- package/docs/api/foundation-auth.loginack.md +0 -3
- package/docs/api/foundation-auth.loginnack.md +1 -0
- package/docs/api/{foundation-auth.loginack.refreshauthtoken.md → foundation-auth.loginnack.refreshauthtoken.md} +2 -2
- package/docs/api/foundation-auth.loginparams.md +12 -0
- package/docs/api/foundation-auth.logoututility.md +24 -0
- package/docs/api/{foundation-auth.auth.logout.md → foundation-auth.logoututility.run.md} +3 -3
- package/docs/api/foundation-auth.md +19 -1
- package/docs/api/foundation-auth.queryparams.md +15 -0
- package/docs/api/foundation-auth.reset_password_url.md +12 -0
- package/docs/api/foundation-auth.resetpasswordparams.md +17 -0
- package/docs/api/foundation-auth.user.isanonymous.md +2 -6
- package/docs/api/foundation-auth.user.isauthenticated.md +2 -6
- package/docs/api/foundation-auth.user.md +2 -5
- package/docs/api/foundation-auth.userconfig.md +21 -0
- package/docs/api/foundation-auth.userconfig.trackactionexclusions.md +13 -0
- package/docs/api/foundation-auth.userconfig.trackpathexclusions.md +13 -0
- package/docs/api/foundation-auth.userpathhistory.md +1 -1
- package/docs/api/foundation-auth.userpathhistory.trackpath.md +1 -8
- package/docs/api-report.md +185 -131
- package/package.json +45 -12
- package/dist/dts/entity/user.d.ts.map +0 -1
- package/docs/api/foundation-auth.auth.loginwithcookies.md +0 -15
- package/docs/api/foundation-auth.auth.loginwithcredentials.md +0 -22
- package/docs/api/foundation-auth.authconfig.autoconnect.md +0 -13
- package/docs/api/foundation-auth.authmachinecontext.credentials.md +0 -18
- package/docs/api/foundation-auth.defaultauthmachine.addloginevents.md +0 -23
- package/docs/api/foundation-auth.defaultuser.refreshauthtoken.md +0 -11
- package/docs/api/foundation-auth.defaultuser.sessionauthtoken.md +0 -11
- package/docs/api/foundation-auth.loginack.sessionauthtoken.md +0 -11
- package/docs/api/foundation-auth.loginack.sessionid.md +0 -11
- package/docs/api/foundation-auth.user.refreshauthtoken.md +0 -11
- package/docs/api/foundation-auth.user.sessionauthtoken.md +0 -11
package/README.md
CHANGED
|
@@ -1,8 +1,104 @@
|
|
|
1
1
|
# Foundation Auth
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://lerna.js.org/)
|
|
4
|
+
[](https://www.typescriptlang.org/)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
`foundation-auth` provides several exports to promote reuse and extensibility at various levels. These include but are
|
|
7
|
+
not limited to:
|
|
8
|
+
|
|
9
|
+
* `Auth`: The fully featured authentication micro frontend.
|
|
10
|
+
* `User`: The user singleton, which always exists in either an anonymous or authenticated mode.
|
|
11
|
+
* `AuthStore`: An auth based `foundation-store`.
|
|
12
|
+
* `AuthMachine`: An auth based `foundation-state-machine` covering the various auth workflows.
|
|
13
|
+
* `AuthMessageMapper`: The auth message dto to entity mapper.
|
|
14
|
+
* `LogoutUtility`: A logout utility.
|
|
15
|
+
* Various UI components / screens.
|
|
16
|
+
|
|
17
|
+
In most cases, developers simply import both the `User` and `Auth` micro frontend, and use the `configure` export token
|
|
18
|
+
to tailor the micro frontend to their specific needs in their router config. However, developers can also use the
|
|
19
|
+
exports provided to build their own authentication frontends or workflows. A set of pre-defined custom events are used
|
|
20
|
+
to interact with the `AuthStore` and `AuthMachine`, and developers can provide custom implementations of parts of the
|
|
21
|
+
machine's workflow.
|
|
22
|
+
|
|
23
|
+
## Basic setup instructions
|
|
24
|
+
These examples are based on a host application using [FAST](https://www.fast.design/) and the
|
|
25
|
+
[FASTRouter](https://www.npmjs.com/package/@microsoft/fast-router). However, setup in the frontend and router of your
|
|
26
|
+
choice should be quite similar.
|
|
27
|
+
|
|
28
|
+
### Import the user
|
|
29
|
+
```ts
|
|
30
|
+
import { User } from '@genesislcap/foundation-auth/user';
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Set up a route to host the micro frontend
|
|
34
|
+
Here we are lazy loading the micro frontend when the route is accessed.
|
|
35
|
+
```ts
|
|
36
|
+
{
|
|
37
|
+
title: 'Login',
|
|
38
|
+
name: 'login',
|
|
39
|
+
path: 'login', // < at what path should the micro frontend be accessed
|
|
40
|
+
element: async () => {
|
|
41
|
+
const { Auth, configure } = await import('@genesislcap/foundation-auth');
|
|
42
|
+
configure({
|
|
43
|
+
omitRoutes: ['request-account'],
|
|
44
|
+
hostPath: 'login', // < important to match the route path
|
|
45
|
+
defaultRedirectUrl: 'my-dashboard',
|
|
46
|
+
logo: myLogo,
|
|
47
|
+
background: myBG,
|
|
48
|
+
});
|
|
49
|
+
return Auth;
|
|
50
|
+
},
|
|
51
|
+
childRouters: true,
|
|
52
|
+
settings: { public: true },
|
|
53
|
+
layout: authLayout,
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Checking the user authentication status during routing
|
|
58
|
+
Here in our `FASTRouter`'s `NavigationContributor`, we check the user status as part of the routing flow.
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
this.contributors.push({
|
|
62
|
+
navigate: async (phase) => {
|
|
63
|
+
const settings = phase.route.settings;
|
|
64
|
+
/**
|
|
65
|
+
* Don't block public routes or any routes when authenticated
|
|
66
|
+
*/
|
|
67
|
+
if (settings?.public || this.user.isAuthenticated) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Otherwise route them to login
|
|
72
|
+
*/
|
|
73
|
+
phase.cancel(() => {
|
|
74
|
+
this.user.trackPath();
|
|
75
|
+
Route.name.replace(phase.router, 'login');
|
|
76
|
+
});
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Establishing a Websocket Connection
|
|
82
|
+
Post login you can import the `SOCKET_URL` from auth and connect to the backend.
|
|
83
|
+
|
|
84
|
+
```ts
|
|
85
|
+
import { SOCKET_URL } from '@genesislcap/foundation-auth/env';
|
|
86
|
+
...
|
|
87
|
+
@Connect private connect: Connect,
|
|
88
|
+
...
|
|
89
|
+
this.connect.connect(SOCKET_URL);
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## [API Docs](./docs/api/index.md)
|
|
93
|
+
|
|
94
|
+
## License
|
|
95
|
+
|
|
96
|
+
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.
|
|
97
|
+
|
|
98
|
+
### Licensed components
|
|
99
|
+
Genesis low-code platform
|
|
100
|
+
|
|
101
|
+
# Docs to aid collaboration during development (Will be removed)
|
|
6
102
|
|
|
7
103
|
1. Get VPN up and ensure `public-foundation-hardened1` is running, then run:
|
|
8
104
|
|
|
@@ -12,6 +108,26 @@ npm run dev:withVars
|
|
|
12
108
|
|
|
13
109
|
This will load the .envs. There's work to do in `genx` to load these by default, so we need `lerna` to do it for now.
|
|
14
110
|
|
|
111
|
+
If you're testing as part of an app, there needs to be a .env file in that root, and it should contain the following variables:
|
|
112
|
+
|
|
113
|
+
```dotenv
|
|
114
|
+
# There should be nothing sensetive here!
|
|
115
|
+
|
|
116
|
+
# HTTP
|
|
117
|
+
GENX_LOGIN_URL=https://public-foundation-hardened1/sm/event-login-auth
|
|
118
|
+
GENX_LOGIN_REFRESH_URL=https://public-foundation-hardened1/sm/event-login-auth
|
|
119
|
+
GENX_LOGIN_DETAILS_URL=https://public-foundation-hardened1/sm/event-login-details
|
|
120
|
+
GENX_LOGOUT_URL=https://public-foundation-hardened1/sm/event-logout
|
|
121
|
+
GENX_CHANGE_PASSWORD_URL=https://public-foundation-hardened1/sm/event-change-user-password
|
|
122
|
+
GENX_FORGOT_PASSWORD_URL=https://public-foundation-hardened1/sm/event-self-service-password-reset
|
|
123
|
+
GENX_RESET_PASSWORD_URL=https://public-foundation-hardened1/sm/event-password-reset-action
|
|
124
|
+
|
|
125
|
+
# Socket
|
|
126
|
+
GENX_SOCKET_URL=wss://public-foundation-hardened1/gwf/
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
You will see warnings in the console if any are unset.
|
|
130
|
+
|
|
15
131
|
2. Autofill the form with JohnDoe and the usual password.
|
|
16
132
|
|
|
17
133
|
3. Press Login button or use the shortcut links on the login screen's footer to
|
|
@@ -23,11 +139,3 @@ trigger machine events to test various, ie. when you already have a cookie, or l
|
|
|
23
139
|
|
|
24
140
|
6. Other gotchas like the previous point exist.
|
|
25
141
|
|
|
26
|
-
[API](./docs/api/index.md)
|
|
27
|
-
|
|
28
|
-
## License
|
|
29
|
-
|
|
30
|
-
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.
|
|
31
|
-
|
|
32
|
-
### Licensed components
|
|
33
|
-
Genesis low-code platform
|
|
@@ -28,6 +28,9 @@ export interface Product {
|
|
|
28
28
|
* @public
|
|
29
29
|
*/
|
|
30
30
|
export interface EVENT_LOGIN_AUTH_ACK extends ACK {
|
|
31
|
+
/**
|
|
32
|
+
* Keeping these 3 here for now as I'm assuming these DTOs will be autogenerated at some point and will contain these.
|
|
33
|
+
*/
|
|
31
34
|
readonly SESSION_AUTH_TOKEN: string;
|
|
32
35
|
readonly REFRESH_AUTH_TOKEN: string;
|
|
33
36
|
readonly SESSION_ID: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EVENT_LOGIN_AUTH_ACK.d.ts","sourceRoot":"","sources":["../../../src/dto/EVENT_LOGIN_AUTH_ACK.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;IACzC,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;IACzC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;I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C;IAC3B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,0BAA0B,EAAE,OAAO,CAAC;IAC7C,QAAQ,CAAC,0BAA0B,EAAE,MAAM,CAAC;IAC5C,QAAQ,CAAC,2BAA2B,EAAE,MAAM,CAAC;IAC7C;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,IAAI,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;CAC5B"}
|
|
@@ -3,5 +3,9 @@ import type { NACK } from './NACK';
|
|
|
3
3
|
* @public
|
|
4
4
|
*/
|
|
5
5
|
export interface EVENT_LOGIN_AUTH_NACK extends NACK {
|
|
6
|
+
/**
|
|
7
|
+
* A refresh token may be returned in a NACK on MFA_REQUIRED or similar.
|
|
8
|
+
*/
|
|
9
|
+
readonly REFRESH_AUTH_TOKEN: string;
|
|
6
10
|
}
|
|
7
11
|
//# sourceMappingURL=EVENT_LOGIN_AUTH_NACK.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EVENT_LOGIN_AUTH_NACK.d.ts","sourceRoot":"","sources":["../../../src/dto/EVENT_LOGIN_AUTH_NACK.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,IAAI;
|
|
1
|
+
{"version":3,"file":"EVENT_LOGIN_AUTH_NACK.d.ts","sourceRoot":"","sources":["../../../src/dto/EVENT_LOGIN_AUTH_NACK.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,IAAI;IACjD;;OAEG;IACH,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;CACrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MESSAGE.d.ts","sourceRoot":"","sources":["../../../src/dto/MESSAGE.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"MESSAGE.d.ts","sourceRoot":"","sources":["../../../src/dto/MESSAGE.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,YAAY,EAAE,GAAG,YAAY,EAAE,CAAC;IACzC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
export declare enum MESSAGE_TYPE {
|
|
5
|
+
LOGIN_ACK = "EVENT_LOGIN_AUTH_ACK",
|
|
6
|
+
LOGIN_NACK = "EVENT_LOGIN_AUTH_NACK",
|
|
7
|
+
LOGIN_DETAILS_ACK = "EVENT_LOGIN_DETAILS_ACK",
|
|
8
|
+
LOGIN_DETAILS_NACK = "EVENT_LOGIN_DETAILS_NACK",
|
|
9
|
+
LOGOUT_ACK = "LOGOUT_ACK",
|
|
10
|
+
LOGOUT_NACK = "EVENT_LOGOUT_NACK",
|
|
11
|
+
EVENT_NACK = "EVENT_NACK"
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=MESSAGE_TYPE.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MESSAGE_TYPE.d.ts","sourceRoot":"","sources":["../../../src/dto/MESSAGE_TYPE.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,YAAY;IACtB,SAAS,yBAAyB;IAClC,UAAU,0BAA0B;IACpC,iBAAiB,4BAA4B;IAC7C,kBAAkB,6BAA6B;IAC/C,UAAU,eAAe;IACzB,WAAW,sBAAsB;IACjC,UAAU,eAAe;CAC1B"}
|
package/dist/dts/dto/index.d.ts
CHANGED
|
@@ -3,4 +3,5 @@ export { EVENT_LOGIN_AUTH_NACK } from './EVENT_LOGIN_AUTH_NACK';
|
|
|
3
3
|
export { EVENT_LOGIN_DETAILS_ACK } from './EVENT_LOGIN_DETAILS_ACK';
|
|
4
4
|
export { LOGOUT_ACK } from './LOGOUT_ACK';
|
|
5
5
|
export { EVENT_LOGOUT_NACK } from './EVENT_LOGOUT_NACK';
|
|
6
|
+
export { MESSAGE_TYPE } from './MESSAGE_TYPE';
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dto/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dto/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/entity/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/entity/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
|
|
@@ -28,9 +28,6 @@ export interface Product {
|
|
|
28
28
|
* @public
|
|
29
29
|
*/
|
|
30
30
|
export interface LoginAck extends Ack {
|
|
31
|
-
readonly sessionAuthToken: string;
|
|
32
|
-
readonly refreshAuthToken: string;
|
|
33
|
-
readonly sessionId: string;
|
|
34
31
|
readonly userName: string;
|
|
35
32
|
readonly updateQueue: string;
|
|
36
33
|
readonly zeroMqProxyModeEnabled: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loginAck.d.ts","sourceRoot":"","sources":["../../../src/entity/loginAck.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;I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B,EAAE,OAAO,CAAC;IACzC,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;IACxC,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;CAC5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loginNack.d.ts","sourceRoot":"","sources":["../../../src/entity/loginNack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,IAAI;IACrC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;CACtC"}
|
|
1
|
+
{"version":3,"file":"loginNack.d.ts","sourceRoot":"","sources":["../../../src/entity/loginNack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,IAAI;IACrC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;CACtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../src/entity/message.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../src/entity/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,WAAW,EAAE,GAAG,YAAY,EAAE,CAAC;IACxC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B"}
|
package/dist/dts/env.d.ts
CHANGED
|
@@ -18,6 +18,21 @@ export { LOGIN_DETAILS_URL };
|
|
|
18
18
|
*/
|
|
19
19
|
declare let LOGOUT_URL: string;
|
|
20
20
|
export { LOGOUT_URL };
|
|
21
|
+
/**
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
declare let CHANGE_PASSWORD_URL: string;
|
|
25
|
+
export { CHANGE_PASSWORD_URL };
|
|
26
|
+
/**
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
declare let FORGOT_PASSWORD_URL: string;
|
|
30
|
+
export { FORGOT_PASSWORD_URL };
|
|
31
|
+
/**
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
declare let RESET_PASSWORD_URL: string;
|
|
35
|
+
export { RESET_PASSWORD_URL };
|
|
21
36
|
/**
|
|
22
37
|
* @public
|
|
23
38
|
*/
|
package/dist/dts/env.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/env.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,QAAA,IAAI,SAAS,EAAE,MAAgB,CAAC;AAUhC,OAAO,EAAE,SAAS,EAAE,CAAC;AAGrB;;GAEG;AACH,QAAA,IAAI,iBAAiB,EAAE,MAAgB,CAAC;AAUxC,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAG7B;;GAEG;AACH,QAAA,IAAI,iBAAiB,EAAE,MAAgB,CAAC;AAUxC,OAAO,EAAE,iBAAiB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/env.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,QAAA,IAAI,SAAS,EAAE,MAAgB,CAAC;AAUhC,OAAO,EAAE,SAAS,EAAE,CAAC;AAGrB;;GAEG;AACH,QAAA,IAAI,iBAAiB,EAAE,MAAgB,CAAC;AAUxC,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAG7B;;GAEG;AACH,QAAA,IAAI,iBAAiB,EAAE,MAAgB,CAAC;AAUxC,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAG7B;;GAEG;AACH,QAAA,IAAI,UAAU,EAAE,MAAgB,CAAC;AAUjC,OAAO,EAAE,UAAU,EAAE,CAAC;AAGtB;;GAEG;AACH,QAAA,IAAI,mBAAmB,EAAE,MAAgB,CAAC;AAU1C,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAG/B;;GAEG;AACH,QAAA,IAAI,mBAAmB,EAAE,MAAgB,CAAC;AAU1C,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAG/B;;GAEG;AACH,QAAA,IAAI,kBAAkB,EAAE,MAAgB,CAAC;AAUzC,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAG9B;;GAEG;AACH,QAAA,IAAI,UAAU,EAAE,MAAgB,CAAC;AAUjC,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export * from './env';
|
|
2
2
|
export * from './dto';
|
|
3
3
|
export * from './entity';
|
|
4
|
+
export * from './logout';
|
|
4
5
|
export * from './machine';
|
|
5
6
|
export * from './main';
|
|
6
7
|
export * from './mapper';
|
|
7
8
|
export * from './routes';
|
|
8
9
|
export * from './store';
|
|
10
|
+
export * from './user';
|
|
9
11
|
export * from './utils';
|
|
10
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/dts/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/logout/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LogoutUtility interface.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* A utility to execute a logout flow via a route change.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export interface LogoutUtility {
|
|
10
|
+
run(): void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Default LogoutUtility.
|
|
14
|
+
*
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
export declare class DefaultLogoutUtility implements LogoutUtility {
|
|
18
|
+
private config;
|
|
19
|
+
private user;
|
|
20
|
+
run(): void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* LogoutUtility DI key.
|
|
24
|
+
*
|
|
25
|
+
* @privateRemarks
|
|
26
|
+
* Marked as internal to stop api-extractor becoming confused cross-linking tokens with the same name.
|
|
27
|
+
*
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
export declare const LogoutUtility: import("@microsoft/fast-foundation").InterfaceSymbol<LogoutUtility>;
|
|
31
|
+
//# sourceMappingURL=logout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../../src/logout/logout.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,GAAG,IAAI,IAAI,CAAC;CACb;AAED;;;;GAIG;AACH,qBAAa,oBAAqB,YAAW,aAAa;IAC5C,OAAO,CAAC,MAAM,CAAa;IACjC,OAAO,CAAC,IAAI,CAAO;IACzB,GAAG;CAKJ;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,qEAEzB,CAAC"}
|
|
@@ -3,10 +3,10 @@ import type { Message } from '@genesislcap/foundation-comms';
|
|
|
3
3
|
import { AbstractMachine, FetchMachine, FetchMachineEvent, Machine } from '@genesislcap/foundation-state-machine';
|
|
4
4
|
import { UUID } from '@genesislcap/foundation-utils';
|
|
5
5
|
import type { InterpreterOptions } from 'xstate';
|
|
6
|
-
import { User } from '../entity';
|
|
7
6
|
import { AuthConfig } from '../main/config';
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
7
|
+
import { AuthMessageMapper } from '../mapper/messageMapper';
|
|
8
|
+
import { User } from '../user';
|
|
9
|
+
import type { AuthMachineContext, AuthMachineEvent, LoginParams, QueryParams } from './types';
|
|
10
10
|
/**
|
|
11
11
|
* AuthMachine interface.
|
|
12
12
|
* @public
|
|
@@ -22,26 +22,40 @@ export declare class DefaultAuthMachine extends AbstractMachine<AuthMachineConte
|
|
|
22
22
|
private connect;
|
|
23
23
|
private fetchMachine;
|
|
24
24
|
private messageBuilder;
|
|
25
|
-
private
|
|
25
|
+
private cm;
|
|
26
26
|
private uuid;
|
|
27
|
-
private
|
|
28
|
-
private logoutMapper;
|
|
27
|
+
private messageMapper;
|
|
29
28
|
private config;
|
|
30
|
-
constructor(user: User, connect: Connect, fetchMachine: FetchMachine, messageBuilder: MessageBuilder,
|
|
29
|
+
constructor(user: User, connect: Connect, fetchMachine: FetchMachine, messageBuilder: MessageBuilder, cm: CredentialManager, uuid: UUID, messageMapper: AuthMessageMapper, config: AuthConfig);
|
|
31
30
|
start(options?: InterpreterOptions<typeof this.machine>): void;
|
|
32
31
|
/**
|
|
33
32
|
* AuthMachine is a singleton.
|
|
34
33
|
*/
|
|
35
34
|
getFromContainer(): this;
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
protected captureAuthQueryParams(): QueryParams;
|
|
36
|
+
protected convertQueryParamsToLoginParams(params: QueryParams): LoginParams;
|
|
37
|
+
protected createFetchMachineEvent(url: string, msg?: Message): FetchMachineEvent;
|
|
38
|
+
protected onIdleEvents: () => {
|
|
38
39
|
login: {
|
|
39
40
|
actions: string[];
|
|
40
41
|
target: string;
|
|
41
42
|
};
|
|
42
|
-
"
|
|
43
|
+
"forgot-password": {
|
|
44
|
+
actions: string[];
|
|
45
|
+
target: string;
|
|
46
|
+
};
|
|
47
|
+
"change-password": {
|
|
48
|
+
actions: string[];
|
|
43
49
|
target: string;
|
|
44
50
|
};
|
|
51
|
+
"reset-password": {
|
|
52
|
+
actions: string[];
|
|
53
|
+
target: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
protected onDoneDTO: () => {
|
|
57
|
+
actions: string[];
|
|
58
|
+
target: string;
|
|
45
59
|
};
|
|
46
60
|
}
|
|
47
61
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machine.d.ts","sourceRoot":"","sources":["../../../src/machine/machine.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"machine.d.ts","sourceRoot":"","sources":["../../../src/machine/machine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAA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gBAAgB,IAAI,IAAI;IAIxB,SAAS,CAAC,sBAAsB,IAAI,WAAW;IAQ/C,SAAS,CAAC,+BAA+B,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW;IAqB3E,SAAS,CAAC,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,OAAY,GAAG,iBAAiB;IAgBpF,SAAS,CAAC,YAAY;;;;;;;;;;;;;;;;;MAiBnB;IAEH,SAAS,CAAC,SAAS;;;MAGhB;CACJ;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,mEAA0E,CAAC"}
|
|
@@ -1,8 +1,50 @@
|
|
|
1
1
|
import type { AuthInfo } from '@genesislcap/foundation-comms';
|
|
2
2
|
import type { MachineContext } from '@genesislcap/foundation-state-machine';
|
|
3
3
|
import type { DoneInvokeEvent, ErrorEvent } from 'xstate';
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
4
|
+
import type { AuthDTO, AuthEntity } from '../mapper';
|
|
5
|
+
import type { User } from '../user';
|
|
6
|
+
/**
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export type LoginParams = AuthInfo;
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export type ChangePasswordParams = {
|
|
14
|
+
username: string;
|
|
15
|
+
oldPassword: string;
|
|
16
|
+
newPassword: string;
|
|
17
|
+
requester?: string;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export type ForgotPasswordParams = {
|
|
23
|
+
username: string;
|
|
24
|
+
returnUrl: string;
|
|
25
|
+
requester?: string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
export type ResetPasswordParams = {
|
|
31
|
+
username: string;
|
|
32
|
+
resetToken: string;
|
|
33
|
+
newPassword: string;
|
|
34
|
+
requester?: string;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
export type QueryParams = {
|
|
40
|
+
SSO_TOKEN?: string;
|
|
41
|
+
MFA_CODE?: string;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* AuthMachineEventParams type.
|
|
45
|
+
* @public
|
|
46
|
+
*/
|
|
47
|
+
export type AuthMachineEventParams = LoginParams | ForgotPasswordParams | ChangePasswordParams | ResetPasswordParams | QueryParams;
|
|
6
48
|
/**
|
|
7
49
|
* AuthMachineContext interface.
|
|
8
50
|
* @remarks
|
|
@@ -11,23 +53,17 @@ import type { AuthDTO, AuthEntity, Mapper } from '../mapper';
|
|
|
11
53
|
*/
|
|
12
54
|
export interface AuthMachineContext extends MachineContext {
|
|
13
55
|
/**
|
|
14
|
-
*
|
|
15
|
-
* @remarks
|
|
16
|
-
* Optional as it's possible to reauthenticate silently.
|
|
56
|
+
* Authentication event params.
|
|
17
57
|
*/
|
|
18
|
-
|
|
58
|
+
params?: AuthMachineEventParams;
|
|
19
59
|
/**
|
|
20
60
|
* The login/login DTO from the fetch machine.
|
|
21
61
|
*/
|
|
22
|
-
|
|
62
|
+
dto: AuthDTO;
|
|
23
63
|
/**
|
|
24
64
|
* The login/login Entity mapped from the DTO.
|
|
25
65
|
*/
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* The mapper for the action being taken.
|
|
29
|
-
*/
|
|
30
|
-
mapper: Mapper<AuthDTO, AuthEntity>;
|
|
66
|
+
entity: AuthEntity;
|
|
31
67
|
/**
|
|
32
68
|
* The user, either authenticated or anonymous.
|
|
33
69
|
*/
|
|
@@ -41,17 +77,18 @@ export interface AuthMachineContext extends MachineContext {
|
|
|
41
77
|
*/
|
|
42
78
|
export type AuthMachineEvent = {
|
|
43
79
|
type: 'login';
|
|
44
|
-
params:
|
|
45
|
-
credentials?: AuthInfo;
|
|
46
|
-
};
|
|
80
|
+
params: LoginParams;
|
|
47
81
|
} | {
|
|
48
82
|
type: 'logout';
|
|
49
83
|
} | {
|
|
50
|
-
type: '
|
|
84
|
+
type: 'change-password';
|
|
85
|
+
params: ChangePasswordParams;
|
|
51
86
|
} | {
|
|
52
|
-
type: '
|
|
87
|
+
type: 'forgot-password';
|
|
88
|
+
params: ForgotPasswordParams;
|
|
53
89
|
} | {
|
|
54
|
-
type: '
|
|
90
|
+
type: 'reset-password';
|
|
91
|
+
params: ResetPasswordParams;
|
|
55
92
|
} | DoneInvokeEvent<unknown> | ErrorEvent<unknown>;
|
|
56
93
|
/**
|
|
57
94
|
* AuthMachineEventMap type.
|
|
@@ -67,4 +104,16 @@ export type AuthMachineEventMap = {
|
|
|
67
104
|
* @public
|
|
68
105
|
*/
|
|
69
106
|
export declare const defaultAuthMachineContext: Partial<AuthMachineContext>;
|
|
107
|
+
/**
|
|
108
|
+
* isLoginParams.
|
|
109
|
+
* @param params - Potential LoginParams.
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
export declare function isLoginParams(params: AuthMachineEventParams): params is LoginParams;
|
|
113
|
+
/**
|
|
114
|
+
* isQueryParams.
|
|
115
|
+
* @param params - Potential QueryParams.
|
|
116
|
+
* @public
|
|
117
|
+
*/
|
|
118
|
+
export declare function isQueryParams(params: AuthMachineEventParams): params is QueryParams;
|
|
70
119
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/machine/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/machine/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAA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