@genesislcap/foundation-auth 14.71.1-auth-mf.21 → 14.99.0-auth-mf.22

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.
Files changed (191) hide show
  1. package/README.md +27 -11
  2. package/dist/dts/components/zero-components.d.ts.map +1 -1
  3. package/dist/dts/config/config.d.ts +0 -9
  4. package/dist/dts/config/config.d.ts.map +1 -1
  5. package/dist/dts/config/templates.d.ts +1 -0
  6. package/dist/dts/config/templates.d.ts.map +1 -1
  7. package/dist/dts/dto/IDP.d.ts +9 -0
  8. package/dist/dts/dto/IDP.d.ts.map +1 -0
  9. package/dist/dts/dto/index.d.ts +1 -0
  10. package/dist/dts/dto/index.d.ts.map +1 -1
  11. package/dist/dts/entity/idp.d.ts +9 -0
  12. package/dist/dts/entity/idp.d.ts.map +1 -0
  13. package/dist/dts/entity/index.d.ts +1 -0
  14. package/dist/dts/entity/index.d.ts.map +1 -1
  15. package/dist/dts/entity/loginNack.d.ts +2 -0
  16. package/dist/dts/entity/loginNack.d.ts.map +1 -1
  17. package/dist/dts/entity/nack.d.ts +4 -0
  18. package/dist/dts/entity/nack.d.ts.map +1 -1
  19. package/dist/dts/env.d.ts +10 -0
  20. package/dist/dts/env.d.ts.map +1 -1
  21. package/dist/dts/machine/actions.d.ts +15 -0
  22. package/dist/dts/machine/actions.d.ts.map +1 -0
  23. package/dist/dts/machine/errors.d.ts +26 -0
  24. package/dist/dts/machine/errors.d.ts.map +1 -0
  25. package/dist/dts/machine/guards.d.ts +9 -0
  26. package/dist/dts/machine/guards.d.ts.map +1 -0
  27. package/dist/dts/machine/index.d.ts +2 -0
  28. package/dist/dts/machine/index.d.ts.map +1 -1
  29. package/dist/dts/machine/machine.d.ts +1 -1
  30. package/dist/dts/machine/machine.d.ts.map +1 -1
  31. package/dist/dts/main/main.d.ts +36 -3
  32. package/dist/dts/main/main.d.ts.map +1 -1
  33. package/dist/dts/main/main.styles.d.ts.map +1 -1
  34. package/dist/dts/main/main.template.d.ts +8 -0
  35. package/dist/dts/main/main.template.d.ts.map +1 -1
  36. package/dist/dts/mapper/loginMapper.d.ts.map +1 -1
  37. package/dist/dts/mapper/passwordManagementMapper.d.ts +1 -1
  38. package/dist/dts/mapper/passwordManagementMapper.d.ts.map +1 -1
  39. package/dist/dts/mapper/types.d.ts +2 -2
  40. package/dist/dts/mapper/utils.d.ts +20 -10
  41. package/dist/dts/mapper/utils.d.ts.map +1 -1
  42. package/dist/dts/routes/base.d.ts +4 -11
  43. package/dist/dts/routes/base.d.ts.map +1 -1
  44. package/dist/dts/routes/forgot-password/forgot-password.d.ts +0 -1
  45. package/dist/dts/routes/forgot-password/forgot-password.d.ts.map +1 -1
  46. package/dist/dts/routes/index.d.ts +0 -1
  47. package/dist/dts/routes/index.d.ts.map +1 -1
  48. package/dist/dts/routes/login/login.d.ts +1 -1
  49. package/dist/dts/routes/login/login.d.ts.map +1 -1
  50. package/dist/dts/routes/reset-password/reset-password.d.ts +0 -1
  51. package/dist/dts/routes/reset-password/reset-password.d.ts.map +1 -1
  52. package/dist/dts/services/idp.d.ts +41 -0
  53. package/dist/dts/services/idp.d.ts.map +1 -0
  54. package/dist/dts/services/index.d.ts +2 -0
  55. package/dist/dts/services/index.d.ts.map +1 -0
  56. package/dist/dts/store/auth.d.ts +17 -4
  57. package/dist/dts/store/auth.d.ts.map +1 -1
  58. package/dist/dts/store/authFormEntry.d.ts +56 -20
  59. package/dist/dts/store/authFormEntry.d.ts.map +1 -1
  60. package/dist/dts/tags/tags.d.ts +2 -5
  61. package/dist/dts/tags/tags.d.ts.map +1 -1
  62. package/dist/dts/utils/index.d.ts +0 -1
  63. package/dist/dts/utils/index.d.ts.map +1 -1
  64. package/dist/dts/utils/logger.d.ts +1 -1
  65. package/dist/dts/utils/logger.d.ts.map +1 -1
  66. package/dist/esm/components/zero-components.js +2 -2
  67. package/dist/esm/config/config.js +1 -1
  68. package/dist/esm/config/templates.js +1 -0
  69. package/dist/esm/dto/IDP.js +1 -0
  70. package/dist/esm/entity/idp.js +1 -0
  71. package/dist/esm/entity/index.js +1 -0
  72. package/dist/esm/env.js +29 -1
  73. package/dist/esm/machine/actions.js +24 -0
  74. package/dist/esm/machine/errors.js +40 -0
  75. package/dist/esm/machine/guards.js +11 -0
  76. package/dist/esm/machine/index.js +2 -0
  77. package/dist/esm/machine/machine.js +57 -66
  78. package/dist/esm/main/main.js +53 -3
  79. package/dist/esm/main/main.styles.js +7 -1
  80. package/dist/esm/main/main.template.js +16 -3
  81. package/dist/esm/mapper/loginMapper.js +2 -2
  82. package/dist/esm/mapper/passwordManagementMapper.js +1 -1
  83. package/dist/esm/mapper/utils.js +69 -13
  84. package/dist/esm/routes/base.js +9 -13
  85. package/dist/esm/routes/config.js +1 -1
  86. package/dist/esm/routes/forgot-password/forgot-password.js +0 -4
  87. package/dist/esm/routes/index.js +0 -1
  88. package/dist/esm/routes/login/login.js +13 -12
  89. package/dist/esm/routes/login/login.template.js +3 -3
  90. package/dist/esm/routes/reset-password/reset-password.js +0 -4
  91. package/dist/esm/services/idp.js +71 -0
  92. package/dist/esm/services/index.js +1 -0
  93. package/dist/esm/store/auth.js +25 -3
  94. package/dist/esm/store/authFormEntry.js +68 -49
  95. package/dist/esm/tags/tags.js +2 -20
  96. package/dist/esm/utils/index.js +0 -1
  97. package/dist/esm/utils/logger.js +1 -1
  98. package/dist/foundation-auth.api.json +816 -769
  99. package/dist/foundation-auth.d.ts +210 -91
  100. package/docs/api/foundation-auth.authformentryeventmap.md +1 -1
  101. package/docs/api/foundation-auth.authformentrystore.idps.md +1 -1
  102. package/docs/api/foundation-auth.authformentrystore.md +4 -6
  103. package/docs/api/foundation-auth.authformentrystore.onselectedidpchanged.md +3 -3
  104. package/docs/api/foundation-auth.authformentrystore.password2.md +5 -0
  105. package/docs/api/foundation-auth.authformentrystore.selectedidp.md +3 -3
  106. package/docs/api/{foundation-auth.authformentrystore.host.md → foundation-auth.authformentrystore.ssologinurl.md} +3 -3
  107. package/docs/api/foundation-auth.authstore.errormessages.md +11 -0
  108. package/docs/api/foundation-auth.authstore.md +2 -0
  109. package/docs/api/foundation-auth.authstore.metamessages.md +11 -0
  110. package/docs/api/foundation-auth.defaultauthformentrystore.autofilling.md +1 -0
  111. package/docs/api/foundation-auth.defaultauthformentrystore.email.md +1 -0
  112. package/docs/api/foundation-auth.defaultauthformentrystore.haspasswordexpired.md +1 -0
  113. package/docs/api/foundation-auth.defaultauthformentrystore.idps.md +2 -1
  114. package/docs/api/{foundation-auth.defaultauthformentrystore.haserrors.md → foundation-auth.defaultauthformentrystore.idpservice.md} +3 -3
  115. package/docs/api/foundation-auth.defaultauthformentrystore.md +6 -16
  116. package/docs/api/foundation-auth.defaultauthformentrystore.mfacode.md +1 -0
  117. package/docs/api/foundation-auth.defaultauthformentrystore.onautofillform.md +1 -0
  118. package/docs/api/foundation-auth.defaultauthformentrystore.onemailchanged.md +1 -0
  119. package/docs/api/foundation-auth.defaultauthformentrystore.onorganisationchanged.md +1 -0
  120. package/docs/api/foundation-auth.defaultauthformentrystore.onpassword2changed.md +1 -0
  121. package/docs/api/foundation-auth.defaultauthformentrystore.onpasswordchanged.md +1 -0
  122. package/docs/api/foundation-auth.defaultauthformentrystore.onselectedidpchanged.md +4 -3
  123. package/docs/api/foundation-auth.defaultauthformentrystore.onshowpasswordschanged.md +1 -0
  124. package/docs/api/foundation-auth.defaultauthformentrystore.onssotogglechanged.md +1 -0
  125. package/docs/api/foundation-auth.defaultauthformentrystore.onusernamechanged.md +1 -0
  126. package/docs/api/foundation-auth.defaultauthformentrystore.organisation.md +1 -0
  127. package/docs/api/foundation-auth.defaultauthformentrystore.orgusername.md +1 -0
  128. package/docs/api/foundation-auth.defaultauthformentrystore.password.md +1 -0
  129. package/docs/api/foundation-auth.defaultauthformentrystore.password2.md +5 -0
  130. package/docs/api/foundation-auth.defaultauthformentrystore.passwordresettoken.md +1 -0
  131. package/docs/api/foundation-auth.defaultauthformentrystore.selectedidp.md +4 -3
  132. package/docs/api/foundation-auth.defaultauthformentrystore.showpasswords.md +1 -0
  133. package/docs/api/{foundation-auth.defaultauthformentrystore.message.md → foundation-auth.defaultauthformentrystore.ssologinurl.md} +4 -3
  134. package/docs/api/foundation-auth.defaultauthformentrystore.ssotoggled.md +1 -0
  135. package/docs/api/foundation-auth.defaultauthformentrystore.termsagreed.md +1 -0
  136. package/docs/api/foundation-auth.defaultauthformentrystore.username.md +1 -0
  137. package/docs/api/foundation-auth.defaultauthmachine._constructor_.md +1 -1
  138. package/docs/api/{foundation-auth.defaultauthmachine.ondonedto.md → foundation-auth.defaultauthmachine.dtotransition.md} +3 -3
  139. package/docs/api/foundation-auth.defaultauthmachine.md +1 -1
  140. package/docs/api/foundation-auth.defaultauthstore.errormessages.md +12 -0
  141. package/docs/api/foundation-auth.defaultauthstore.ispending.md +1 -0
  142. package/docs/api/foundation-auth.defaultauthstore.md +3 -1
  143. package/docs/api/foundation-auth.defaultauthstore.metamessages.md +12 -0
  144. package/docs/api/foundation-auth.defaultauthstore.onchangepassword.md +1 -0
  145. package/docs/api/foundation-auth.defaultauthstore.onforgotpassword.md +1 -0
  146. package/docs/api/foundation-auth.defaultauthstore.onlogin.md +1 -0
  147. package/docs/api/foundation-auth.defaultauthstore.onlogout.md +1 -0
  148. package/docs/api/foundation-auth.defaultauthstore.onresetpassword.md +1 -0
  149. package/docs/api/{foundation-auth.idpresponse.id.md → foundation-auth.fromidpdto.md} +5 -3
  150. package/docs/api/foundation-auth.idp.description.md +11 -0
  151. package/docs/api/foundation-auth.idp.id.md +3 -3
  152. package/docs/api/foundation-auth.idp.md +3 -2
  153. package/docs/api/foundation-auth.idp.type.md +3 -3
  154. package/docs/api/foundation-auth.is200nack.md +13 -0
  155. package/docs/api/foundation-auth.isnackdto.md +1 -1
  156. package/docs/api/foundation-auth.isnackentity.md +24 -0
  157. package/docs/api/foundation-auth.loadingtemplate.md +12 -0
  158. package/docs/api/foundation-auth.logger.md +1 -1
  159. package/docs/api/foundation-auth.loginnack.hasincorrectcredentials.md +11 -0
  160. package/docs/api/foundation-auth.loginnack.maxtriesreached.md +11 -0
  161. package/docs/api/foundation-auth.loginnack.md +2 -0
  162. package/docs/api/foundation-auth.md +12 -11
  163. package/docs/api/foundation-auth.routertemplate.md +12 -0
  164. package/docs/api/foundation-auth.seterror.md +25 -0
  165. package/docs/api/{foundation-auth.idpresponse.type.md → foundation-auth.sso_list_url.md} +4 -3
  166. package/docs/api/foundation-auth.sso_login_url.md +12 -0
  167. package/docs/api/foundation-auth.ssoconfig.md +0 -1
  168. package/docs/api-report.md +175 -76
  169. package/package.json +12 -13
  170. package/dist/dts/utils/sso.d.ts +0 -27
  171. package/dist/dts/utils/sso.d.ts.map +0 -1
  172. package/dist/esm/utils/sso.js +0 -50
  173. package/docs/api/foundation-auth.authformentrystore.haserrors.md +0 -11
  174. package/docs/api/foundation-auth.authformentrystore.message.md +0 -11
  175. package/docs/api/foundation-auth.authrouting.getroutepath.md +0 -13
  176. package/docs/api/foundation-auth.authrouting.md +0 -37
  177. package/docs/api/foundation-auth.authrouting.navigateto.md +0 -16
  178. package/docs/api/foundation-auth.defaultauthformentrystore.autofill.md +0 -15
  179. package/docs/api/foundation-auth.defaultauthformentrystore.fetchmachine.md +0 -11
  180. package/docs/api/foundation-auth.defaultauthformentrystore.host.md +0 -11
  181. package/docs/api/foundation-auth.defaultauthformentrystore.resetidpstate.md +0 -15
  182. package/docs/api/foundation-auth.defaultauthformentrystore.ssotoggledchanged.md +0 -23
  183. package/docs/api/foundation-auth.defaultauthrouting.getroutepath.md +0 -24
  184. package/docs/api/foundation-auth.defaultauthrouting.md +0 -22
  185. package/docs/api/foundation-auth.defaultauthrouting.navigateto.md +0 -26
  186. package/docs/api/foundation-auth.fetchidps.md +0 -13
  187. package/docs/api/foundation-auth.fromdtonackerrorwarningarray.md +0 -12
  188. package/docs/api/foundation-auth.getauthrouting.md +0 -32
  189. package/docs/api/foundation-auth.getssologinurl.md +0 -13
  190. package/docs/api/foundation-auth.idpresponse.md +0 -20
  191. package/docs/api/foundation-auth.includeserrorwarningcode.md +0 -13
@@ -3,26 +3,35 @@
3
3
  import { AbstractMachine } from '@genesislcap/foundation-state-machine';
4
4
  import { AbstractStore } from '@genesislcap/foundation-store';
5
5
  import { AbstractStoreRoot } from '@genesislcap/foundation-store';
6
+ import { ActionArgs } from 'xstate';
7
+ import { AnyActorContext } from 'xstate';
8
+ import { AnyState } from 'xstate';
9
+ import { Assigner } from 'xstate';
10
+ import { BindingObserver } from '@microsoft/fast-element';
6
11
  import { ComposableStyles } from '@microsoft/fast-element';
7
12
  import { Constructable } from '@microsoft/fast-element';
8
13
  import { Container } from '@microsoft/fast-foundation';
9
14
  import { Controller } from '@microsoft/fast-element';
10
- import type { DoneInvokeEvent } from 'xstate';
15
+ import { DoneInvokeEvent } from 'xstate';
11
16
  import { ElementStyles } from '@microsoft/fast-element';
12
17
  import { EmitOptions } from '@genesislcap/foundation-events';
13
18
  import { EmitReturn } from '@genesislcap/foundation-events';
14
19
  import type { ErrorEvent as ErrorEvent_2 } from 'xstate';
20
+ import { EventObject } from 'xstate';
15
21
  import { FetchMachine } from '@genesislcap/foundation-state-machine';
16
22
  import { FetchMachineEvent } from '@genesislcap/foundation-state-machine';
17
23
  import { InterfaceSymbol } from '@microsoft/fast-foundation';
18
24
  import type { InterpreterOptions } from 'xstate';
19
25
  import { Key } from '@microsoft/fast-foundation';
20
26
  import { Listener } from '@genesislcap/foundation-utils';
21
- import { Logger } from '@genesislcap/foundation-utils';
27
+ import { Logger } from '@genesislcap/foundation-logger';
22
28
  import { Machine } from '@genesislcap/foundation-state-machine';
23
29
  import type { MachineContext } from '@genesislcap/foundation-state-machine';
30
+ import { MachineContext as MachineContext_2 } from 'xstate';
24
31
  import { Observer } from '@genesislcap/foundation-utils';
32
+ import { ParameterizedObject } from 'xstate';
25
33
  import { PartialFASTElementDefinition } from '@microsoft/fast-element';
34
+ import { PropertyAssigner } from 'xstate';
26
35
  import { RouterConfiguration } from '@microsoft/fast-router';
27
36
  import { Store } from '@genesislcap/foundation-store';
28
37
  import { StoreRoot } from '@genesislcap/foundation-store';
@@ -226,7 +235,7 @@ export declare type AuthFormEntryEventMap = {
226
235
  'auth-password-changed': string;
227
236
  'auth-password2-changed': string;
228
237
  'auth-showPasswords-changed': boolean;
229
- 'auth-selectedIDP-changed': string;
238
+ 'auth-selectedIdp-changed': string;
230
239
  'auth-ssoToggled-changed': boolean;
231
240
  };
232
241
 
@@ -235,21 +244,23 @@ export declare type AuthFormEntryEventMap = {
235
244
  * @public
236
245
  */
237
246
  export declare interface AuthFormEntryStore extends Store {
238
- readonly host: string;
239
247
  readonly organisation: string;
240
248
  readonly username: string;
241
249
  readonly orgUsername: string;
242
250
  readonly email: string;
243
251
  readonly password: string;
252
+ /**
253
+ * @remarks
254
+ * New, confirm etc.
255
+ */
244
256
  readonly password2: string;
245
257
  readonly showPasswords: boolean;
246
258
  readonly hasPasswordExpired: boolean;
247
259
  readonly passwordResetToken: string;
248
- readonly message: string;
249
- readonly hasErrors: boolean;
250
260
  readonly mfaCode: string;
251
- readonly idps: IDP[];
252
- readonly selectedIDP: string;
261
+ readonly idps: Idp[];
262
+ readonly selectedIdp: Idp;
263
+ readonly ssoLoginUrl: string;
253
264
  readonly ssoToggled: boolean;
254
265
  readonly termsAgreed: boolean;
255
266
  readonly autofilling: boolean;
@@ -259,13 +270,13 @@ export declare interface AuthFormEntryStore extends Store {
259
270
  onPasswordChanged(event: CustomEvent<string>): void;
260
271
  onPassword2Changed(event: CustomEvent<string>): void;
261
272
  onShowPasswordsChanged(event: CustomEvent<boolean>): void;
262
- onSelectedIDPChanged(event: CustomEvent<string>): void;
273
+ onSelectedIdpChanged(event: CustomEvent<string>): void;
263
274
  onSSOToggleChanged(event: CustomEvent<boolean>): void;
264
275
  onAutofillForm(event: CustomEvent<void>): void;
265
276
  }
266
277
 
267
278
  /**
268
- * DI key of the store.
279
+ * AuthFormEntryStore DI key.
269
280
  * @internal
270
281
  */
271
282
  export declare const AuthFormEntryStore: InterfaceSymbol<Key>;
@@ -387,8 +398,8 @@ export declare type AuthMessageMapperLookup = {
387
398
  [MESSAGE_TYPE.CHANGE_PASSWORD]: PasswordManagementMapper;
388
399
  [MESSAGE_TYPE.RESET_PASSWORD]: PasswordManagementMapper;
389
400
  /**
390
- * Generic
391
- * TODO: update these to use a generic mapper
401
+ * Generic (shouldn't really get these)
402
+ * TODO: Update to use a generic mapper, for now let logout mapper surface error
392
403
  */
393
404
  [MESSAGE_TYPE.EVENT_NACK]: LogoutMapper;
394
405
  };
@@ -443,7 +454,7 @@ export declare type AuthRoutes = (typeof AuthRoutes)[keyof typeof AuthRoutes];
443
454
  *
444
455
  * @public
445
456
  */
446
- export declare interface AuthRouting {
457
+ declare interface AuthRouting {
447
458
  /** {@inheritDoc navigateTo} */
448
459
  navigateTo: typeof navigateTo;
449
460
  /** {@inheritDoc getRoutePath} */
@@ -458,7 +469,7 @@ export declare interface AuthRouting {
458
469
  *
459
470
  * @internal
460
471
  */
461
- export declare const AuthRouting: InterfaceSymbol<AuthRouting>;
472
+ declare const AuthRouting: InterfaceSymbol<AuthRouting>;
462
473
 
463
474
  /**
464
475
  * AuthStore interface.
@@ -469,6 +480,8 @@ export declare const AuthRouting: InterfaceSymbol<AuthRouting>;
469
480
  export declare interface AuthStore extends StoreRoot {
470
481
  readonly isPending: boolean;
471
482
  readonly formEntry: AuthFormEntryStore;
483
+ readonly metaMessages: string[];
484
+ readonly errorMessages: string[];
472
485
  /**
473
486
  * Auth workflows and transient state (context in xstate lingo).
474
487
  */
@@ -485,7 +498,7 @@ export declare interface AuthStore extends StoreRoot {
485
498
  }
486
499
 
487
500
  /**
488
- * DI key of the store.
501
+ * AuthStore DI key.
489
502
  * @internal
490
503
  */
491
504
  export declare const AuthStore: InterfaceSymbol<Key>;
@@ -786,44 +799,78 @@ export { CredentialType_2 as CredentialType }
786
799
  export declare const defaultAuthConfig: AuthConfig;
787
800
 
788
801
  /**
789
- * Default implementation of the store.
802
+ * Default AuthFormEntryStore.
790
803
  * @public
791
804
  */
792
805
  export declare class DefaultAuthFormEntryStore extends AbstractStore<AuthFormEntryStore, AuthFormEntryEventMap, InternalEventMap> implements AuthFormEntryStore {
793
806
  protected config: AuthConfig;
794
807
  protected credentialManager: CredentialManager;
795
- readonly fetchMachine: FetchMachine;
796
- host: string;
808
+ readonly idpService: IDPService;
809
+ /** {@inheritDoc AuthFormEntryStore.organisation} */
797
810
  organisation: string;
811
+ /** {@inheritDoc AuthFormEntryStore.username} */
798
812
  username: string;
813
+ /** {@inheritDoc AuthFormEntryStore.email} */
799
814
  email: string;
815
+ /** {@inheritDoc AuthFormEntryStore.password} */
800
816
  password: string;
817
+ /** {@inheritDoc AuthFormEntryStore.password2} */
801
818
  password2: string;
819
+ /** {@inheritDoc AuthFormEntryStore.showPasswords} */
802
820
  showPasswords: boolean;
821
+ /** {@inheritDoc AuthFormEntryStore.hasPasswordExpired} */
803
822
  hasPasswordExpired: boolean;
823
+ /** {@inheritDoc AuthFormEntryStore.passwordResetToken} */
804
824
  passwordResetToken: string;
805
- message: string;
806
- hasErrors: boolean;
825
+ /** {@inheritDoc AuthFormEntryStore.mfaCode} */
807
826
  mfaCode: string;
808
- idps: IDP[];
809
- selectedIDP: string;
827
+ /** {@inheritDoc AuthFormEntryStore.idps} */
828
+ idps: Idp[];
829
+ /** {@inheritDoc AuthFormEntryStore.selectedIdp} */
830
+ selectedIdp: Idp;
831
+ /** {@inheritDoc AuthFormEntryStore.ssoToggled} */
810
832
  ssoToggled: boolean;
833
+ /** {@inheritDoc AuthFormEntryStore.termsAgreed} */
811
834
  termsAgreed: boolean;
835
+ /** {@inheritDoc AuthFormEntryStore.autofilling} */
812
836
  autofilling: boolean;
837
+ /** {@inheritDoc AuthFormEntryStore.orgUsername} */
813
838
  get orgUsername(): string;
814
839
  constructor();
840
+ /**
841
+ * @internal
842
+ */
815
843
  protected resetIDPState(): void;
844
+ /**
845
+ * @internal
846
+ */
816
847
  protected autofill(): Promise<boolean>;
848
+ /** {@inheritDoc AuthFormEntryStore.onAutofillForm} */
817
849
  onAutofillForm: EventListener;
850
+ /** {@inheritDoc AuthFormEntryStore.onOrganisationChanged} */
818
851
  onOrganisationChanged: EventListener;
852
+ /** {@inheritDoc AuthFormEntryStore.onUsernameChanged} */
819
853
  onUsernameChanged: EventListener;
854
+ /** {@inheritDoc AuthFormEntryStore.onEmailChanged} */
820
855
  onEmailChanged: EventListener;
856
+ /** {@inheritDoc AuthFormEntryStore.onPasswordChanged} */
821
857
  onPasswordChanged: EventListener;
858
+ /** {@inheritDoc AuthFormEntryStore.onPassword2Changed} */
822
859
  onPassword2Changed: EventListener;
860
+ /** {@inheritDoc AuthFormEntryStore.onShowPasswordsChanged} */
823
861
  onShowPasswordsChanged: EventListener;
824
- onSelectedIDPChanged: EventListener;
862
+ /** {@inheritDoc AuthFormEntryStore.onSelectedIdpChanged} */
863
+ onSelectedIdpChanged: EventListener;
864
+ /** {@inheritDoc AuthFormEntryStore.onSSOToggleChanged} */
825
865
  onSSOToggleChanged: EventListener;
826
- protected ssoToggledChanged(prev: boolean, next: boolean): void;
866
+ /**
867
+ * @privateRemarks
868
+ * Internally observed given constructor assignment.
869
+ * @internal
870
+ */
871
+ protected ssoToggledChanged: (prev: boolean, next: boolean) => Promise<void>;
872
+ /** {@inheritDoc AuthFormEntryStore.ssoLoginUrl} */
873
+ get ssoLoginUrl(): string;
827
874
  }
828
875
 
829
876
  /**
@@ -865,7 +912,7 @@ export declare class DefaultAuthMachine extends AbstractMachine<AuthMachineConte
865
912
  target: string;
866
913
  };
867
914
  };
868
- protected onDoneDTO: () => {
915
+ protected dtoTransition: () => {
869
916
  actions: string[];
870
917
  target: string;
871
918
  };
@@ -889,21 +936,7 @@ export declare class DefaultAuthMessageMapper extends DefaultMessageMapper<AuthM
889
936
  }
890
937
 
891
938
  /**
892
- * Default AuthRouting.
893
- *
894
- * @public
895
- */
896
- export declare class DefaultAuthRouting implements AuthRouting {
897
- /** @internal */
898
- private config;
899
- /** {@inheritDoc AuthRouting.navigateTo} */
900
- navigateTo(route: AuthRoutes | string): void;
901
- /** {@inheritDoc AuthRouting.getRoutePath} */
902
- getRoutePath(route: AuthRoutes | string): string;
903
- }
904
-
905
- /**
906
- * Default implementation of the store.
939
+ * Default AuthStore.
907
940
  * @public
908
941
  */
909
942
  export declare class DefaultAuthStore extends AbstractStoreRoot<AuthStore, AuthEventMap, InternalAuthEventMap> implements AuthStore {
@@ -911,13 +944,24 @@ export declare class DefaultAuthStore extends AbstractStoreRoot<AuthStore, AuthE
911
944
  readonly authMachine: AuthMachine;
912
945
  readonly formEntry: AuthFormEntryStore;
913
946
  constructor(config: AuthConfig, authMachine: AuthMachine, formEntry: AuthFormEntryStore);
947
+ /** {@inheritDoc AuthStore.isPending} */
914
948
  get isPending(): boolean;
949
+ /** {@inheritDoc AuthStore.onMachineEvent} */
915
950
  onMachineEvent: EventListener;
951
+ /** {@inheritDoc AuthStore.onLogin} */
916
952
  onLogin: EventListener;
953
+ /** {@inheritDoc AuthStore.onLogout} */
917
954
  onLogout: EventListener;
955
+ /** {@inheritDoc AuthStore.onChangePassword} */
918
956
  onChangePassword: EventListener;
957
+ /** {@inheritDoc AuthStore.onForgotPassword} */
919
958
  onForgotPassword: EventListener;
959
+ /** {@inheritDoc AuthStore.onResetPassword} */
920
960
  onResetPassword: EventListener;
961
+ /** {@inheritDoc AuthStore.metaMessages} */
962
+ get metaMessages(): string[];
963
+ /** {@inheritDoc AuthStore.errorMessages} */
964
+ get errorMessages(): string[];
921
965
  }
922
966
 
923
967
  /**
@@ -1253,11 +1297,9 @@ export declare interface EVENT_SELF_SERVICE_PASSWORD_RESET extends MESSAGE {
1253
1297
  }
1254
1298
 
1255
1299
  /**
1256
- * Request SSO identity provider list
1257
- *
1258
- * @public
1300
+ * @internal
1259
1301
  */
1260
- export declare const fetchIDPs: (path?: string, host?: string) => Promise<IDP[]>;
1302
+ declare type EventMap = AuthEventMap & Pick<AuthFormEntryEventMap, 'auth-autofill-form'> & {};
1261
1303
 
1262
1304
  /**
1263
1305
  * Do not reference any ../main files here. We must avoid ../tags being referenced and therefore setup pre-configuration.
@@ -1341,6 +1383,10 @@ export declare class FoundationAuth extends FoundationAuth_base {
1341
1383
  * @internal
1342
1384
  */
1343
1385
  container: Container;
1386
+ /**
1387
+ * @internal
1388
+ */
1389
+ protected machineBinding: BindingObserver;
1344
1390
  /**
1345
1391
  * @internal
1346
1392
  */
@@ -1353,6 +1399,14 @@ export declare class FoundationAuth extends FoundationAuth_base {
1353
1399
  * @internal
1354
1400
  */
1355
1401
  protected registerDIDependencies(): void;
1402
+ /**
1403
+ * @internal
1404
+ */
1405
+ protected addBindings(): void;
1406
+ /**
1407
+ * @internal
1408
+ */
1409
+ protected removeBindings(): void;
1356
1410
  /**
1357
1411
  * @internal
1358
1412
  */
@@ -1369,10 +1423,22 @@ export declare class FoundationAuth extends FoundationAuth_base {
1369
1423
  * @internal
1370
1424
  */
1371
1425
  get isReady(): boolean;
1426
+ /**
1427
+ * @internal
1428
+ */
1429
+ get classNames(): string;
1430
+ /**
1431
+ * @internal
1432
+ */
1433
+ template(): ViewTemplate<FoundationAuth, any>;
1434
+ /**
1435
+ * @internal
1436
+ */
1437
+ attemptAutofill(): void;
1372
1438
  }
1373
1439
 
1374
1440
  declare const FoundationAuth_base: abstract new (...args: any[]) => {
1375
- $emit<K extends "store-connected" | "store-disconnected" | "store-ready" | "auth-machine-event" | "auth-login" | "auth-logout" | "auth-change-password" | "auth-forgot-password" | "auth-reset-password">(...args: AuthEventMap[K] extends void ? [type: K, options?: EmitOptions] : [type: K, detail: AuthEventMap[K], options?: EmitOptions]): EmitReturn;
1441
+ $emit<K extends "auth-autofill-form" | "store-connected" | "store-disconnected" | "store-ready" | "auth-machine-event" | "auth-login" | "auth-logout" | "auth-change-password" | "auth-forgot-password" | "auth-reset-password">(...args: EventMap[K] extends void ? [type: K, options?: EmitOptions] : [type: K, detail: EventMap[K], options?: EmitOptions]): EmitReturn;
1376
1442
  accessKey: string;
1377
1443
  readonly accessKeyLabel: string;
1378
1444
  autocapitalize: string;
@@ -1382,7 +1448,9 @@ declare const FoundationAuth_base: abstract new (...args: any[]) => {
1382
1448
  inert: boolean;
1383
1449
  innerText: string;
1384
1450
  lang: string;
1385
- readonly offsetHeight: number;
1451
+ readonly offsetHeight: number; /**
1452
+ * @internal
1453
+ */
1386
1454
  readonly offsetLeft: number;
1387
1455
  readonly offsetParent: Element;
1388
1456
  readonly offsetTop: number;
@@ -1701,34 +1769,17 @@ export declare const fromDTOAck: (dto: ACK) => Ack;
1701
1769
  */
1702
1770
  export declare const fromDTONack: (dto: NACK) => Nack;
1703
1771
 
1704
- /**
1705
- * @public
1706
- */
1707
- export declare const fromDTONackErrorWarningArray: (arr: NACK_ERROR_WARNING[]) => NackErrorWarning[];
1708
-
1709
1772
  /**
1710
1773
  * @public
1711
1774
  */
1712
1775
  export declare const fromDTOStringArray: (arr: string[]) => string[];
1713
1776
 
1714
1777
  /**
1715
- * Gets AuthRouting from the DI container.
1716
- *
1717
- * @remarks
1718
- * A utility method for host applications that are not using decorators or the DI container.
1719
- *
1720
- * @example
1721
- * ```ts
1722
- * import { getAuthRouting } from '@genesislcap/foundation-auth/routing';
1723
- * ...
1724
- * private authRouting = getAuthRouting();
1725
- * ...
1726
- * this.authRouting.navigateTo('logout');
1727
- * ```
1728
- *
1778
+ * fromIDPDTO
1779
+ * @param dto - IDP.
1729
1780
  * @public
1730
1781
  */
1731
- export declare function getAuthRouting(): AuthRouting;
1782
+ export declare const fromIDPDTO: (dto: IDP) => Idp;
1732
1783
 
1733
1784
  /**
1734
1785
  * Represents options for retrieving credentials.
@@ -1736,6 +1787,14 @@ export declare function getAuthRouting(): AuthRouting;
1736
1787
  */
1737
1788
  export declare type GetCredentialOptions = CredentialRequestOptions & {};
1738
1789
 
1790
+ /**
1791
+ * getNormalisedText
1792
+ * @param arr - A NackErrorWarning array.
1793
+ * @returns A combined text string.
1794
+ * @internal
1795
+ */
1796
+ export declare const getNormalisedText: (arr: NackErrorWarning[]) => string;
1797
+
1739
1798
  /**
1740
1799
  * A utility to get a sub route path taking the host path into account.
1741
1800
  *
@@ -1746,13 +1805,6 @@ export declare type GetCredentialOptions = CredentialRequestOptions & {};
1746
1805
  */
1747
1806
  export declare function getRoutePath(route: AuthRoutes | string, hostPath?: string): string;
1748
1807
 
1749
- /**
1750
- * Get SSO identity provider login URL
1751
- *
1752
- * @public
1753
- */
1754
- export declare const getSSOLoginURL: (idp: any, path?: string, host?: string) => string;
1755
-
1756
1808
  /**
1757
1809
  * Gets User from the DI container.
1758
1810
  *
@@ -1784,32 +1836,57 @@ export declare const hasDTOErrorWarningCode: (dto: NACK, code: string) => boolea
1784
1836
  * @public
1785
1837
  */
1786
1838
  export declare interface IDP {
1787
- id: string;
1788
- type: string;
1839
+ readonly ID: string;
1840
+ readonly TYPE: string;
1841
+ readonly DESCRIPTION: string;
1789
1842
  }
1790
1843
 
1791
1844
  /**
1792
1845
  * @public
1793
1846
  */
1794
- export declare interface IDPResponse {
1795
- ID: string;
1796
- TYPE: string;
1847
+ export declare interface Idp {
1848
+ readonly id: string;
1849
+ readonly type: string;
1850
+ readonly description: string;
1797
1851
  }
1798
1852
 
1799
1853
  /**
1800
- * includesErrorWarningCode
1854
+ * IDPService interface.
1801
1855
  * @public
1802
1856
  */
1803
- export declare const includesErrorWarningCode: (arr: NACK_ERROR_WARNING[], code: string) => boolean;
1857
+ declare interface IDPService {
1858
+ /**
1859
+ * @param url - Defaults to `SSO_LIST_URL`.
1860
+ */
1861
+ getList(url?: string): Promise<Idp[]>;
1862
+ /**
1863
+ * @param idp - An idp entity.
1864
+ */
1865
+ getLoginUrl(idp: Idp): string;
1866
+ }
1867
+
1868
+ /**
1869
+ * IDPService DI key.
1870
+ * @internal
1871
+ */
1872
+ declare const IDPService: InterfaceSymbol<IDPService>;
1804
1873
 
1805
1874
  declare type InternalAuthEventMap = {};
1806
1875
 
1807
1876
  declare type InternalEventMap = {
1808
1877
  'auth-fetch-idps': void;
1809
- 'auth-fetch-idps-success': IDP[];
1878
+ 'auth-fetch-idps-success': Idp[];
1810
1879
  'auth-fetch-idps-error': Error;
1811
1880
  };
1812
1881
 
1882
+ /**
1883
+ * is200Nack.
1884
+ * @privateRemarks
1885
+ * Required until http status codes are aligned on backend.
1886
+ * @public
1887
+ */
1888
+ export declare const is200Nack: <TOutput = any>(event: EventObject | DoneInvokeEvent<TOutput>) => event is DoneInvokeEvent<TOutput>;
1889
+
1813
1890
  /**
1814
1891
  * isChangePasswordParams.
1815
1892
  * @remarks
@@ -1923,12 +2000,19 @@ export declare const isMappingError: (error: unknown) => error is MappingError;
1923
2000
  export declare function isMFRoute(pathname?: string): boolean;
1924
2001
 
1925
2002
  /**
1926
- * isDTONack.
2003
+ * isNackDTO.
1927
2004
  * @param dto - Potential NACK.
1928
2005
  * @public
1929
2006
  */
1930
2007
  export declare function isNackDTO(dto: unknown): dto is NACK;
1931
2008
 
2009
+ /**
2010
+ * isNackEntity.
2011
+ * @param entity - Potential Nack.
2012
+ * @public
2013
+ */
2014
+ export declare function isNackEntity(entity: unknown): entity is Nack;
2015
+
1932
2016
  /**
1933
2017
  * isQueryParams.
1934
2018
  * @param params - Potential QueryParams.
@@ -1954,6 +2038,11 @@ export declare type JWTCredentials = {
1954
2038
  domain: string;
1955
2039
  };
1956
2040
 
2041
+ /**
2042
+ * @public
2043
+ */
2044
+ export declare const loadingTemplate: ViewTemplate<FoundationAuth, any>;
2045
+
1957
2046
  /**
1958
2047
  * @public
1959
2048
  */
@@ -2054,6 +2143,8 @@ export declare const LoginMapper: InterfaceSymbol<LoginMapper>;
2054
2143
  */
2055
2144
  export declare interface LoginNack extends Nack {
2056
2145
  readonly refreshAuthToken: string;
2146
+ readonly hasIncorrectCredentials: boolean;
2147
+ readonly maxTriesReached: boolean;
2057
2148
  readonly isMFARequired: boolean;
2058
2149
  readonly hasPasswordExpired: boolean;
2059
2150
  }
@@ -2242,6 +2333,10 @@ export declare interface NACK extends MESSAGE {
2242
2333
  export declare interface Nack extends Message {
2243
2334
  readonly error: NackErrorWarning[];
2244
2335
  readonly warning: NackErrorWarning[];
2336
+ readonly normalisedErrorText: string;
2337
+ readonly normalisedWarningText: string;
2338
+ readonly normalisedErrorStatusCode: number;
2339
+ readonly normalisedWarningStatusCode: number;
2245
2340
  }
2246
2341
 
2247
2342
  /**
@@ -2355,6 +2450,26 @@ export declare type ResetPasswordParams = {
2355
2450
  requester?: string;
2356
2451
  };
2357
2452
 
2453
+ /**
2454
+ * @public
2455
+ */
2456
+ export declare const routerTemplate: ViewTemplate<FoundationAuth, any>;
2457
+
2458
+ /**
2459
+ * Set error action.
2460
+ * @remarks
2461
+ * Used to set a top level error on the machine. This may equal to {@link @genesislcap/foundation-utils#ErrorMap} `lastError` in the `errors` property.
2462
+ * @public
2463
+ */
2464
+ export declare const setError: {
2465
+ (_: ActionArgs<MachineContext_2, EventObject, ParameterizedObject>): void;
2466
+ type: string;
2467
+ assignment: Assigner<MachineContext_2, EventObject> | PropertyAssigner<MachineContext_2, EventObject>;
2468
+ resolve: (actorContext: AnyActorContext, state: AnyState, actionArgs: ActionArgs<any, any, ParameterizedObject>, { assignment }: {
2469
+ assignment: Assigner<any, any> | PropertyAssigner<any, any>;
2470
+ }) => AnyState[];
2471
+ };
2472
+
2358
2473
  /**
2359
2474
  * Defines the parameters you may set on the routes.
2360
2475
  * @public
@@ -2371,6 +2486,16 @@ export declare type Settings = {
2371
2486
  */
2372
2487
  export declare let SOCKET_URL: string;
2373
2488
 
2489
+ /**
2490
+ * @public
2491
+ */
2492
+ export declare let SSO_LIST_URL: string;
2493
+
2494
+ /**
2495
+ * @public
2496
+ */
2497
+ export declare let SSO_LOGIN_URL: string;
2498
+
2374
2499
  /**
2375
2500
  * @public
2376
2501
  */
@@ -2379,15 +2504,6 @@ export declare type SSOConfig = {
2379
2504
  * Optionally toggle the SSO journey on/off by default.
2380
2505
  */
2381
2506
  toggled?: boolean;
2382
- /**
2383
- * The identity providers path under the current host.
2384
- *
2385
- * @example
2386
- * ```ts
2387
- * identityProvidersPath: 'sso/list'
2388
- * ```
2389
- */
2390
- identityProvidersPath: string;
2391
2507
  };
2392
2508
 
2393
2509
  /**
@@ -2436,6 +2552,7 @@ declare type TemplateComponents = {
2436
2552
  router: TemplateElementDependency;
2437
2553
  select: TemplateElementDependency;
2438
2554
  textField: TemplateElementDependency;
2555
+ progress: TemplateElementDependency;
2439
2556
  progressRing: TemplateElementDependency;
2440
2557
  };
2441
2558
 
@@ -2674,6 +2791,8 @@ export declare class ZeroAuth extends FoundationAuth {
2674
2791
  protected loadRemotes(): Promise<void>;
2675
2792
  /**
2676
2793
  * @internal
2794
+ * @privateRemarks
2795
+ * The order of the check is important here, check super first.
2677
2796
  */
2678
2797
  get isReady(): boolean;
2679
2798
  }
@@ -16,7 +16,7 @@ export type AuthFormEntryEventMap = {
16
16
  'auth-password-changed': string;
17
17
  'auth-password2-changed': string;
18
18
  'auth-showPasswords-changed': boolean;
19
- 'auth-selectedIDP-changed': string;
19
+ 'auth-selectedIdp-changed': string;
20
20
  'auth-ssoToggled-changed': boolean;
21
21
  };
22
22
  ```
@@ -7,5 +7,5 @@
7
7
  **Signature:**
8
8
 
9
9
  ```typescript
10
- readonly idps: IDP[];
10
+ readonly idps: Idp[];
11
11
  ```
@@ -19,19 +19,17 @@ export interface AuthFormEntryStore extends Store
19
19
  | --- | --- | --- | --- |
20
20
  | [autofilling](./foundation-auth.authformentrystore.autofilling.md) | <code>readonly</code> | boolean | |
21
21
  | [email](./foundation-auth.authformentrystore.email.md) | <code>readonly</code> | string | |
22
- | [hasErrors](./foundation-auth.authformentrystore.haserrors.md) | <code>readonly</code> | boolean | |
23
22
  | [hasPasswordExpired](./foundation-auth.authformentrystore.haspasswordexpired.md) | <code>readonly</code> | boolean | |
24
- | [host](./foundation-auth.authformentrystore.host.md) | <code>readonly</code> | string | |
25
- | [idps](./foundation-auth.authformentrystore.idps.md) | <code>readonly</code> | [IDP](./foundation-auth.idp.md)<!-- -->\[\] | |
26
- | [message](./foundation-auth.authformentrystore.message.md) | <code>readonly</code> | string | |
23
+ | [idps](./foundation-auth.authformentrystore.idps.md) | <code>readonly</code> | [Idp](./foundation-auth.idp.md)<!-- -->\[\] | |
27
24
  | [mfaCode](./foundation-auth.authformentrystore.mfacode.md) | <code>readonly</code> | string | |
28
25
  | [organisation](./foundation-auth.authformentrystore.organisation.md) | <code>readonly</code> | string | |
29
26
  | [orgUsername](./foundation-auth.authformentrystore.orgusername.md) | <code>readonly</code> | string | |
30
27
  | [password](./foundation-auth.authformentrystore.password.md) | <code>readonly</code> | string | |
31
28
  | [password2](./foundation-auth.authformentrystore.password2.md) | <code>readonly</code> | string | |
32
29
  | [passwordResetToken](./foundation-auth.authformentrystore.passwordresettoken.md) | <code>readonly</code> | string | |
33
- | [selectedIDP](./foundation-auth.authformentrystore.selectedidp.md) | <code>readonly</code> | string | |
30
+ | [selectedIdp](./foundation-auth.authformentrystore.selectedidp.md) | <code>readonly</code> | [Idp](./foundation-auth.idp.md) | |
34
31
  | [showPasswords](./foundation-auth.authformentrystore.showpasswords.md) | <code>readonly</code> | boolean | |
32
+ | [ssoLoginUrl](./foundation-auth.authformentrystore.ssologinurl.md) | <code>readonly</code> | string | |
35
33
  | [ssoToggled](./foundation-auth.authformentrystore.ssotoggled.md) | <code>readonly</code> | boolean | |
36
34
  | [termsAgreed](./foundation-auth.authformentrystore.termsagreed.md) | <code>readonly</code> | boolean | |
37
35
  | [username](./foundation-auth.authformentrystore.username.md) | <code>readonly</code> | string | |
@@ -45,7 +43,7 @@ export interface AuthFormEntryStore extends Store
45
43
  | [onOrganisationChanged(event)](./foundation-auth.authformentrystore.onorganisationchanged.md) | |
46
44
  | [onPassword2Changed(event)](./foundation-auth.authformentrystore.onpassword2changed.md) | |
47
45
  | [onPasswordChanged(event)](./foundation-auth.authformentrystore.onpasswordchanged.md) | |
48
- | [onSelectedIDPChanged(event)](./foundation-auth.authformentrystore.onselectedidpchanged.md) | |
46
+ | [onSelectedIdpChanged(event)](./foundation-auth.authformentrystore.onselectedidpchanged.md) | |
49
47
  | [onShowPasswordsChanged(event)](./foundation-auth.authformentrystore.onshowpasswordschanged.md) | |
50
48
  | [onSSOToggleChanged(event)](./foundation-auth.authformentrystore.onssotogglechanged.md) | |
51
49
  | [onUsernameChanged(event)](./foundation-auth.authformentrystore.onusernamechanged.md) | |
@@ -1,13 +1,13 @@
1
1
  <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
2
 
3
- [Home](./index.md) &gt; [@genesislcap/foundation-auth](./foundation-auth.md) &gt; [AuthFormEntryStore](./foundation-auth.authformentrystore.md) &gt; [onSelectedIDPChanged](./foundation-auth.authformentrystore.onselectedidpchanged.md)
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-auth](./foundation-auth.md) &gt; [AuthFormEntryStore](./foundation-auth.authformentrystore.md) &gt; [onSelectedIdpChanged](./foundation-auth.authformentrystore.onselectedidpchanged.md)
4
4
 
5
- ## AuthFormEntryStore.onSelectedIDPChanged() method
5
+ ## AuthFormEntryStore.onSelectedIdpChanged() method
6
6
 
7
7
  **Signature:**
8
8
 
9
9
  ```typescript
10
- onSelectedIDPChanged(event: CustomEvent<string>): void;
10
+ onSelectedIdpChanged(event: CustomEvent<string>): void;
11
11
  ```
12
12
 
13
13
  ## Parameters
@@ -9,3 +9,8 @@
9
9
  ```typescript
10
10
  readonly password2: string;
11
11
  ```
12
+
13
+ ## Remarks
14
+
15
+ New, confirm etc.
16
+