@aooth/auth-moost 0.2.5 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atscript/index.d.mts +17 -18
- package/dist/atscript/index.mjs +1 -1
- package/dist/{forms-D-MZTAyd.mjs → forms-BUF9oMsE.mjs} +6 -6
- package/dist/index.d.mts +582 -131
- package/dist/index.mjs +1580 -438
- package/package.json +29 -24
- package/src/atscript/models/forms.as +23 -36
- package/src/atscript/models/forms.as.d.ts +17 -18
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aooth/auth-moost",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"description": "Moost auth integration for aoothjs — AuthGuard interceptor, useAuth composable, REST endpoints, workflows",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aoothjs",
|
|
@@ -57,33 +57,38 @@
|
|
|
57
57
|
"access": "public"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@atscript/moost-wf": "^0.1.
|
|
61
|
-
"@wooksjs/http-body": "^0.8.
|
|
62
|
-
"@aooth/arbac-moost": "^0.2.
|
|
63
|
-
"@aooth/auth": "0.2.
|
|
64
|
-
"@aooth/idp": "0.2.
|
|
65
|
-
"@aooth/user": "0.2.
|
|
60
|
+
"@atscript/moost-wf": "^0.1.170",
|
|
61
|
+
"@wooksjs/http-body": "^0.8.3",
|
|
62
|
+
"@aooth/arbac-moost": "^0.2.7",
|
|
63
|
+
"@aooth/auth": "0.2.7",
|
|
64
|
+
"@aooth/idp": "0.2.7",
|
|
65
|
+
"@aooth/user": "0.2.7"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@atscript/core": "^0.2.
|
|
69
|
-
"@atscript/
|
|
70
|
-
"@atscript/
|
|
71
|
-
"@atscript/
|
|
72
|
-
"@
|
|
73
|
-
"@
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
68
|
+
"@atscript/core": "^0.2.11",
|
|
69
|
+
"@atscript/db": "^0.1.175",
|
|
70
|
+
"@atscript/db-sqlite": "^0.1.175",
|
|
71
|
+
"@atscript/moost-db": "^0.1.175",
|
|
72
|
+
"@atscript/typescript": "^0.2.11",
|
|
73
|
+
"@atscript/ui": "^0.1.170",
|
|
74
|
+
"@atscript/ui-fns": "^0.1.170",
|
|
75
|
+
"@moostjs/event-http": "^0.7.6",
|
|
76
|
+
"@moostjs/event-wf": "^0.7.6",
|
|
77
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
78
|
+
"better-sqlite3": "^12.6.2",
|
|
79
|
+
"moost": "^0.7.6",
|
|
80
|
+
"unplugin-atscript": "^0.2.11",
|
|
81
|
+
"wooks": "^0.8.3"
|
|
77
82
|
},
|
|
78
83
|
"peerDependencies": {
|
|
79
|
-
"@atscript/moost-wf": "^0.1.
|
|
80
|
-
"@atscript/typescript": "^0.2.
|
|
81
|
-
"@moostjs/event-http": "^0.7.
|
|
82
|
-
"@moostjs/event-wf": "^0.7.
|
|
83
|
-
"@wooksjs/event-core": "^0.8.
|
|
84
|
-
"@wooksjs/event-http": "^0.8.
|
|
85
|
-
"@wooksjs/http-body": "^0.8.
|
|
86
|
-
"moost": "^0.7.
|
|
84
|
+
"@atscript/moost-wf": "^0.1.170",
|
|
85
|
+
"@atscript/typescript": "^0.2.11",
|
|
86
|
+
"@moostjs/event-http": "^0.7.6",
|
|
87
|
+
"@moostjs/event-wf": "^0.7.6",
|
|
88
|
+
"@wooksjs/event-core": "^0.8.3",
|
|
89
|
+
"@wooksjs/event-http": "^0.8.3",
|
|
90
|
+
"@wooksjs/http-body": "^0.8.3",
|
|
91
|
+
"moost": "^0.7.6"
|
|
87
92
|
},
|
|
88
93
|
"peerDependenciesMeta": {
|
|
89
94
|
"@atscript/typescript": {
|
|
@@ -840,9 +840,10 @@ export interface ConcurrencyLimitForm {
|
|
|
840
840
|
}
|
|
841
841
|
|
|
842
842
|
/**
|
|
843
|
-
* Identifier form
|
|
844
|
-
*
|
|
845
|
-
*
|
|
843
|
+
* Identifier form of the login flow's `magicLink` alt-action
|
|
844
|
+
* (`forms.magicLinkRequest`): an email or username. The link goes to an inbox
|
|
845
|
+
* the account proved; the answer is the same whether or not an account
|
|
846
|
+
* matches.
|
|
846
847
|
*/
|
|
847
848
|
@meta.label 'Sign in with a magic link'
|
|
848
849
|
@meta.description 'Enter your account email or username and we will send you a one-time sign-in link.'
|
|
@@ -856,8 +857,25 @@ export interface MagicLinkRequestForm {
|
|
|
856
857
|
}
|
|
857
858
|
|
|
858
859
|
/**
|
|
859
|
-
*
|
|
860
|
-
*
|
|
860
|
+
* Landing step of a clicked magic link (`forms.magicLinkConfirm`): "Continue
|
|
861
|
+
* as a•••@example.com". Opening the link only renders this form — the link is
|
|
862
|
+
* used up when it is submitted — so a mail scanner that opens links does not
|
|
863
|
+
* spend it, and the masked account shows which account the link is for.
|
|
864
|
+
*/
|
|
865
|
+
@meta.label 'Continue with your link'
|
|
866
|
+
@wf.context.pass 'public'
|
|
867
|
+
@ui.form.submit.text 'Continue'
|
|
868
|
+
export interface MagicLinkConfirmForm {
|
|
869
|
+
@ui.form.order 1
|
|
870
|
+
@ui.form.fn.value '(_, _d, ctx, _e, t) => ctx.public?.magicLink?.account ? t("Continue as {account}.", { account: ctx.public.magicLink.account }) : t("Continue with the link from your email.")'
|
|
871
|
+
notice: ui.paragraph
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* Recovery delivery-mode picker (`forms.recoveryModeSelect`) — rendered after
|
|
876
|
+
* the identifier when `resolveRecoveryDeliveryMode()` returns `'choice'`, for
|
|
877
|
+
* known and unknown identifiers alike. `magicLink` sends a single-use link,
|
|
878
|
+
* `otp` a one-time code.
|
|
861
879
|
*/
|
|
862
880
|
@meta.label 'Choose how to verify'
|
|
863
881
|
@meta.description 'Pick how you would like to recover access.'
|
|
@@ -872,37 +890,6 @@ export interface RecoveryModeSelectForm {
|
|
|
872
890
|
|
|
873
891
|
}
|
|
874
892
|
|
|
875
|
-
/**
|
|
876
|
-
* Recovery factor-verification form — used when
|
|
877
|
-
* `RecoveryWorkflowOptions.requireKnownRecoveryFactor` is true. The user
|
|
878
|
-
* picks a factor type and supplies its value; the server validates against
|
|
879
|
-
* the enrolled factor (phone last-4 or current TOTP code). Options are
|
|
880
|
-
* built from `ctx.public.preReset.availableRecoveryFactors` (workflow whitelist ∩
|
|
881
|
-
* user's enrolled factors), so users only see factors they can actually
|
|
882
|
-
* verify AND that the admin hasn't disabled via `opts.preReset.allowedFactors`.
|
|
883
|
-
* The staged options are shown as given — not passed through `t` — so whoever
|
|
884
|
-
* stages them supplies labels already in the request's language.
|
|
885
|
-
*/
|
|
886
|
-
@meta.label 'Verify your identity'
|
|
887
|
-
@meta.description 'Confirm a detail we have on file before resetting your password.'
|
|
888
|
-
@wf.context.pass 'public'
|
|
889
|
-
export interface RecoveryFactorForm {
|
|
890
|
-
@ui.form.order 10
|
|
891
|
-
@ui.form.type 'radio'
|
|
892
|
-
@ui.form.fn.options '(_, _d, ctx) => Array.isArray(ctx.public?.preReset?.availableRecoveryFactors) ? ctx.public.preReset.availableRecoveryFactors : []'
|
|
893
|
-
@meta.label 'Factor'
|
|
894
|
-
@meta.required
|
|
895
|
-
factor: string
|
|
896
|
-
|
|
897
|
-
@ui.form.order 20
|
|
898
|
-
@ui.form.type 'text'
|
|
899
|
-
@meta.label 'Value'
|
|
900
|
-
@meta.required
|
|
901
|
-
@expect.minLength 4
|
|
902
|
-
@expect.maxLength 12
|
|
903
|
-
value: string
|
|
904
|
-
}
|
|
905
|
-
|
|
906
893
|
/**
|
|
907
894
|
* Authenticated "change my password" form — surfaced by the
|
|
908
895
|
* change-password.flow `change-password-form` step to a SIGNED-IN user.
|
|
@@ -403,7 +403,7 @@ export declare class ConcurrencyLimitForm {
|
|
|
403
403
|
|
|
404
404
|
/**
|
|
405
405
|
* Atscript interface **MagicLinkRequestForm**
|
|
406
|
-
* @see {@link ./forms.as:
|
|
406
|
+
* @see {@link ./forms.as:850:18}
|
|
407
407
|
*/
|
|
408
408
|
export declare class MagicLinkRequestForm {
|
|
409
409
|
identifier: string
|
|
@@ -418,15 +418,15 @@ export declare class MagicLinkRequestForm {
|
|
|
418
418
|
}
|
|
419
419
|
|
|
420
420
|
/**
|
|
421
|
-
* Atscript interface **
|
|
422
|
-
* @see {@link ./forms.as:
|
|
421
|
+
* Atscript interface **MagicLinkConfirmForm**
|
|
422
|
+
* @see {@link ./forms.as:868:18}
|
|
423
423
|
*/
|
|
424
|
-
export declare class
|
|
425
|
-
|
|
424
|
+
export declare class MagicLinkConfirmForm {
|
|
425
|
+
// notice: ui.paragraph
|
|
426
426
|
static __is_atscript_annotated_type: true
|
|
427
|
-
static type: TAtscriptTypeObject<keyof
|
|
427
|
+
static type: TAtscriptTypeObject<keyof MagicLinkConfirmForm, MagicLinkConfirmForm>
|
|
428
428
|
static metadata: TMetadataMap<AtscriptMetadata>
|
|
429
|
-
static validator: (opts?: Partial<TValidatorOptions>) => Validator<typeof
|
|
429
|
+
static validator: (opts?: Partial<TValidatorOptions>) => Validator<typeof MagicLinkConfirmForm>
|
|
430
430
|
/** @deprecated JSON Schema support is disabled. Calling this method will throw a runtime error. To enable, set `jsonSchema: 'lazy'` or `jsonSchema: 'bundle'` in tsPlugin options, or add `@emit.jsonSchema` annotation to individual interfaces. */
|
|
431
431
|
static toJsonSchema: () => any
|
|
432
432
|
/** @deprecated Example Data support is disabled. To enable, set `exampleData: true` in tsPlugin options. */
|
|
@@ -434,16 +434,15 @@ export declare class RecoveryModeSelectForm {
|
|
|
434
434
|
}
|
|
435
435
|
|
|
436
436
|
/**
|
|
437
|
-
* Atscript interface **
|
|
438
|
-
* @see {@link ./forms.as:
|
|
437
|
+
* Atscript interface **RecoveryModeSelectForm**
|
|
438
|
+
* @see {@link ./forms.as:882:18}
|
|
439
439
|
*/
|
|
440
|
-
export declare class
|
|
441
|
-
|
|
442
|
-
value: string
|
|
440
|
+
export declare class RecoveryModeSelectForm {
|
|
441
|
+
mode: string
|
|
443
442
|
static __is_atscript_annotated_type: true
|
|
444
|
-
static type: TAtscriptTypeObject<keyof
|
|
443
|
+
static type: TAtscriptTypeObject<keyof RecoveryModeSelectForm, RecoveryModeSelectForm>
|
|
445
444
|
static metadata: TMetadataMap<AtscriptMetadata>
|
|
446
|
-
static validator: (opts?: Partial<TValidatorOptions>) => Validator<typeof
|
|
445
|
+
static validator: (opts?: Partial<TValidatorOptions>) => Validator<typeof RecoveryModeSelectForm>
|
|
447
446
|
/** @deprecated JSON Schema support is disabled. Calling this method will throw a runtime error. To enable, set `jsonSchema: 'lazy'` or `jsonSchema: 'bundle'` in tsPlugin options, or add `@emit.jsonSchema` annotation to individual interfaces. */
|
|
448
447
|
static toJsonSchema: () => any
|
|
449
448
|
/** @deprecated Example Data support is disabled. To enable, set `exampleData: true` in tsPlugin options. */
|
|
@@ -452,7 +451,7 @@ export declare class RecoveryFactorForm {
|
|
|
452
451
|
|
|
453
452
|
/**
|
|
454
453
|
* Atscript interface **ChangePasswordForm**
|
|
455
|
-
* @see {@link ./forms.as:
|
|
454
|
+
* @see {@link ./forms.as:910:18}
|
|
456
455
|
*/
|
|
457
456
|
export declare class ChangePasswordForm {
|
|
458
457
|
// intro: ui.paragraph
|
|
@@ -472,7 +471,7 @@ export declare class ChangePasswordForm {
|
|
|
472
471
|
|
|
473
472
|
/**
|
|
474
473
|
* Atscript interface **ProveControlForm**
|
|
475
|
-
* @see {@link ./forms.as:
|
|
474
|
+
* @see {@link ./forms.as:975:18}
|
|
476
475
|
*/
|
|
477
476
|
export declare class ProveControlForm {
|
|
478
477
|
// intro: ui.paragraph
|
|
@@ -490,7 +489,7 @@ export declare class ProveControlForm {
|
|
|
490
489
|
|
|
491
490
|
/**
|
|
492
491
|
* Atscript interface **ProveControlOtpForm**
|
|
493
|
-
* @see {@link ./forms.as:
|
|
492
|
+
* @see {@link ./forms.as:1010:18}
|
|
494
493
|
*/
|
|
495
494
|
export declare class ProveControlOtpForm {
|
|
496
495
|
// intro: ui.paragraph
|
|
@@ -509,7 +508,7 @@ export declare class ProveControlOtpForm {
|
|
|
509
508
|
|
|
510
509
|
/**
|
|
511
510
|
* Atscript interface **AuthorizeConsentForm**
|
|
512
|
-
* @see {@link ./forms.as:
|
|
511
|
+
* @see {@link ./forms.as:1062:18}
|
|
513
512
|
*/
|
|
514
513
|
export declare class AuthorizeConsentForm {
|
|
515
514
|
// notice: ui.paragraph
|