@metamask-previews/profile-sync-controller 32.3.1-preview-1efee3183 → 32.3.1-preview-33429d645
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/CHANGELOG.md +18 -1
- package/README.md +19 -11
- package/dist/controllers/authentication/AuthenticationController-method-action-types.d.ts +25 -22
- package/dist/controllers/authentication/AuthenticationController-method-action-types.d.ts.map +1 -1
- package/dist/controllers/authentication/AuthenticationController-method-action-types.js.map +1 -1
- package/dist/controllers/authentication/AuthenticationController.d.ts +33 -21
- package/dist/controllers/authentication/AuthenticationController.d.ts.map +1 -1
- package/dist/controllers/authentication/AuthenticationController.js +115 -69
- package/dist/controllers/authentication/AuthenticationController.js.map +1 -1
- package/dist/controllers/authentication/index.d.ts +1 -1
- package/dist/controllers/authentication/index.d.ts.map +1 -1
- package/dist/controllers/authentication/index.js.map +1 -1
- package/dist/sdk/authentication-jwt-bearer/flow-srp.d.ts +13 -11
- package/dist/sdk/authentication-jwt-bearer/flow-srp.d.ts.map +1 -1
- package/dist/sdk/authentication-jwt-bearer/flow-srp.js +9 -7
- package/dist/sdk/authentication-jwt-bearer/flow-srp.js.map +1 -1
- package/dist/sdk/authentication-jwt-bearer/mfa/schemas.d.ts +13 -14
- package/dist/sdk/authentication-jwt-bearer/mfa/schemas.d.ts.map +1 -1
- package/dist/sdk/authentication-jwt-bearer/mfa/schemas.js +19 -17
- package/dist/sdk/authentication-jwt-bearer/mfa/schemas.js.map +1 -1
- package/dist/sdk/authentication-jwt-bearer/mfa/services.d.ts +6 -6
- package/dist/sdk/authentication-jwt-bearer/mfa/services.d.ts.map +1 -1
- package/dist/sdk/authentication-jwt-bearer/mfa/services.js +8 -6
- package/dist/sdk/authentication-jwt-bearer/mfa/services.js.map +1 -1
- package/dist/sdk/authentication-jwt-bearer/mfa/types.d.ts +25 -11
- package/dist/sdk/authentication-jwt-bearer/mfa/types.d.ts.map +1 -1
- package/dist/sdk/authentication-jwt-bearer/mfa/types.js.map +1 -1
- package/dist/sdk/authentication.d.ts +4 -4
- package/dist/sdk/authentication.d.ts.map +1 -1
- package/dist/sdk/authentication.js.map +1 -1
- package/dist/sdk/errors.d.ts +4 -4
- package/dist/sdk/errors.d.ts.map +1 -1
- package/dist/sdk/errors.js +6 -6
- package/dist/sdk/errors.js.map +1 -1
- package/dist/sdk/index.d.ts +2 -2
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/mocks/auth.d.ts +2 -2
- package/dist/sdk/mocks/auth.d.ts.map +1 -1
- package/dist/sdk/mocks/auth.js +3 -3
- package/dist/sdk/mocks/auth.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **BREAKING:** Rename MFA "step-up" to "credential verification", matching the authentication API's `verify` endpoints ([#10432](https://github.com/MetaMask/core/pull/10432))
|
|
13
|
+
- Methods and messenger actions: `beginStepUp` → `beginCredentialVerification`, `completeStepUp` → `completeCredentialVerification`, `getElevatedProfileToken` → `getVerificationToken`, `clearStepUpSession` → `clearVerificationSession`
|
|
14
|
+
- State and constant: `stepUpSessionExpiresAt` → `verificationSessionExpiresAt`, `STEP_UP_SESSION_TTL_MS` → `VERIFICATION_SESSION_TTL_MS`
|
|
15
|
+
- Types: `ElevatedProfileToken` → `VerificationToken`, `GetElevatedTokenRequest` → `GetVerificationTokenRequest`, and `StepUp` becomes `Verification` in `BeginStepUpRequest`, `CompleteStepUpRequest`, `StepUpChallenge`, `StepUpProof` and `MfaStepUpAssertion`
|
|
16
|
+
- Error: `ElevatedTokenInvalidError` (`elevated_token_invalid`) → `VerificationTokenInvalidError` (`verification_token_invalid`)
|
|
17
|
+
- Trace spans: `MFA Step-Up Begin` / `Complete` → `MFA Verification Begin` / `Complete`
|
|
18
|
+
- **BREAKING:** Accept MFA data as the server sends it ([#10432](https://github.com/MetaMask/core/pull/10432))
|
|
19
|
+
- `email_otp` credentials without an address are kept: `EnrolledCredential.email` is now optional
|
|
20
|
+
- Verification tokens are accepted with any `amr` method name and any `aal`: `claims.amr` is widened and `claims.aal` is removed, since the server enforces assurance levels
|
|
21
|
+
- Let one verification cover a whole setup flow ([#10432](https://github.com/MetaMask/core/pull/10432))
|
|
22
|
+
- The verification session lasts as long as its token, up to 15 minutes instead of 1
|
|
23
|
+
- Enrolling a credential no longer ends the session
|
|
24
|
+
- `beginCredentialEnrollment` only uses a session younger than 2 minutes (`ENROLLMENT_MAX_SESSION_AGE_MS`), or than its new `maxSessionAgeMs` option
|
|
25
|
+
- Bump `@metamask/seedless-onboarding-controller` from `^11.0.0` to `^11.0.1`. ([#10433](https://github.com/MetaMask/core/pull/10433))
|
|
26
|
+
|
|
10
27
|
## [32.3.1]
|
|
11
28
|
|
|
12
29
|
### Changed
|
|
@@ -19,7 +36,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
19
36
|
|
|
20
37
|
- Support AAL2-gated MFA enrollment and sync the MFA SDK with the latest authentication API spec ([#10374](https://github.com/MetaMask/core/pull/10374))
|
|
21
38
|
- `beginMfaEnrollment` accepts an `accessToken` option so enrollment can begin with an elevated token
|
|
22
|
-
- `AuthenticationController.beginCredentialEnrollment` sends the
|
|
39
|
+
- `AuthenticationController.beginCredentialEnrollment` sends the verification token while a step-up session is live, since enrolling additional credentials requires AAL2
|
|
23
40
|
- Add the `email_socially_verified`, `multi_primary_srp` and `aal2_required` MFA error codes, a `StepUpRequiredError` class, and support for the `retry_after_seconds` error field when computing `retryAfterMs`
|
|
24
41
|
- Add `pairedIdentifierIds` to `UserProfile` in `srpSessionData`, set from the login response and, on the primary SRP session, from the SRP and social pairing responses, so clients can tell whether a profile has been socially paired ([#10394](https://github.com/MetaMask/core/pull/10394))
|
|
25
42
|
|
package/README.md
CHANGED
|
@@ -45,23 +45,31 @@ import { ... } from '@metamask/profile-sync-controller/user-storage/mocks'
|
|
|
45
45
|
## Multi-factor authentication
|
|
46
46
|
|
|
47
47
|
`AuthenticationController` exposes UI-independent primitives for passkey and
|
|
48
|
-
email OTP enrollment and
|
|
48
|
+
email OTP enrollment and verification:
|
|
49
49
|
|
|
50
50
|
- `refreshEnrolledCredentials()` refreshes the in-memory credential list.
|
|
51
51
|
- `beginCredentialEnrollment()` and `completeCredentialEnrollment()` surround
|
|
52
|
-
a client-owned passkey ceremony or email-code screen.
|
|
53
|
-
|
|
54
|
-
`beginCredentialEnrollment()` sends the
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
the
|
|
52
|
+
a client-owned passkey ceremony or email-code screen. Once the profile has a
|
|
53
|
+
credential that proves AAL2, the server requires an AAL2 token to begin
|
|
54
|
+
enrolling another one: `beginCredentialEnrollment()` sends the verification
|
|
55
|
+
token only while a session younger than `ENROLLMENT_MAX_SESSION_AGE_MS`
|
|
56
|
+
(2 minutes) is live, and the server otherwise rejects it with
|
|
57
|
+
`aal2_required`, so clients should verify an existing credential and retry.
|
|
58
|
+
The controller never inspects the token's assurance level; the server
|
|
59
|
+
decides. A setup flow that proved a factor itself can pass
|
|
60
|
+
`maxSessionAgeMs` (for example, the time since the flow started) so chained
|
|
61
|
+
enrollments reuse that proof. Enrollment does not end the session.
|
|
62
|
+
- `beginCredentialVerification()` and `completeCredentialVerification()`
|
|
63
|
+
verify an enrolled credential and return a verification token.
|
|
64
|
+
- `getVerificationToken()` reuses a live verification session when it satisfies
|
|
65
|
+
the caller's freshness requirement; `clearVerificationSession()` clears it. The
|
|
66
|
+
session lasts as long as the verification token (at most
|
|
67
|
+
`VERIFICATION_SESSION_TTL_MS`, 15 minutes) and ends on lock, sign-out, reset, or
|
|
68
|
+
a rejected base session.
|
|
61
69
|
|
|
62
70
|
Clients must retain the challenge `flowId`, perform the platform ceremony, and
|
|
63
71
|
send the resulting proof to the matching completion method. OTP codes,
|
|
64
|
-
passkey results, and
|
|
72
|
+
passkey results, and verification tokens are never persisted in controller state.
|
|
65
73
|
|
|
66
74
|
## Contributing
|
|
67
75
|
|
|
@@ -54,46 +54,49 @@ export type AuthenticationControllerCompleteCredentialEnrollmentAction = {
|
|
|
54
54
|
handler: AuthenticationController['completeCredentialEnrollment'];
|
|
55
55
|
};
|
|
56
56
|
/**
|
|
57
|
-
* Begins
|
|
57
|
+
* Begins verification with an enrolled credential.
|
|
58
58
|
*
|
|
59
59
|
* @param request - Credential type and trace reason.
|
|
60
60
|
* @returns A challenge for the client-owned ceremony.
|
|
61
61
|
*/
|
|
62
|
-
export type
|
|
63
|
-
type: `AuthenticationController:
|
|
64
|
-
handler: AuthenticationController['
|
|
62
|
+
export type AuthenticationControllerBeginCredentialVerificationAction = {
|
|
63
|
+
type: `AuthenticationController:beginCredentialVerification`;
|
|
64
|
+
handler: AuthenticationController['beginCredentialVerification'];
|
|
65
65
|
};
|
|
66
66
|
/**
|
|
67
|
-
* Completes
|
|
67
|
+
* Completes verification and opens a short-lived verification session.
|
|
68
68
|
*
|
|
69
|
-
* The
|
|
70
|
-
*
|
|
71
|
-
*
|
|
69
|
+
* The assertion returned by the MFA service is exchanged at Hydra for an
|
|
70
|
+
* access token. Its assurance level is not checked: the services receiving
|
|
71
|
+
* the token enforce their own requirements. The token itself never enters
|
|
72
|
+
* controller state.
|
|
72
73
|
*
|
|
73
74
|
* @param request - Flow identifier, platform or email proof, and trace reason.
|
|
74
|
-
* @returns The
|
|
75
|
+
* @returns The verification token.
|
|
75
76
|
*/
|
|
76
|
-
export type
|
|
77
|
-
type: `AuthenticationController:
|
|
78
|
-
handler: AuthenticationController['
|
|
77
|
+
export type AuthenticationControllerCompleteCredentialVerificationAction = {
|
|
78
|
+
type: `AuthenticationController:completeCredentialVerification`;
|
|
79
|
+
handler: AuthenticationController['completeCredentialVerification'];
|
|
79
80
|
};
|
|
80
81
|
/**
|
|
81
|
-
* Returns the active
|
|
82
|
+
* Returns the active verification token when it meets the requested
|
|
83
|
+
* freshness.
|
|
82
84
|
*
|
|
83
85
|
* @param request - Optional maximum session age in milliseconds, measured
|
|
84
86
|
* from when the token was obtained. Zero always requires a new ceremony.
|
|
85
|
-
* @returns A live
|
|
87
|
+
* @returns A live verification token, or null when no reusable session
|
|
88
|
+
* exists.
|
|
86
89
|
*/
|
|
87
|
-
export type
|
|
88
|
-
type: `AuthenticationController:
|
|
89
|
-
handler: AuthenticationController['
|
|
90
|
+
export type AuthenticationControllerGetVerificationTokenAction = {
|
|
91
|
+
type: `AuthenticationController:getVerificationToken`;
|
|
92
|
+
handler: AuthenticationController['getVerificationToken'];
|
|
90
93
|
};
|
|
91
94
|
/**
|
|
92
|
-
* Clears
|
|
95
|
+
* Clears every in-memory verification session and its expiration timer.
|
|
93
96
|
*/
|
|
94
|
-
export type
|
|
95
|
-
type: `AuthenticationController:
|
|
96
|
-
handler: AuthenticationController['
|
|
97
|
+
export type AuthenticationControllerClearVerificationSessionAction = {
|
|
98
|
+
type: `AuthenticationController:clearVerificationSession`;
|
|
99
|
+
handler: AuthenticationController['clearVerificationSession'];
|
|
97
100
|
};
|
|
98
101
|
export type AuthenticationControllerPerformSignOutAction = {
|
|
99
102
|
type: `AuthenticationController:performSignOut`;
|
|
@@ -202,5 +205,5 @@ export type AuthenticationControllerIsSignedInAction = {
|
|
|
202
205
|
/**
|
|
203
206
|
* Union of all AuthenticationController action types.
|
|
204
207
|
*/
|
|
205
|
-
export type AuthenticationControllerMethodActions = AuthenticationControllerPerformSignInAction | AuthenticationControllerRequestProfilePairingAction | AuthenticationControllerRefreshEnrolledCredentialsAction | AuthenticationControllerBeginCredentialEnrollmentAction | AuthenticationControllerCompleteCredentialEnrollmentAction |
|
|
208
|
+
export type AuthenticationControllerMethodActions = AuthenticationControllerPerformSignInAction | AuthenticationControllerRequestProfilePairingAction | AuthenticationControllerRefreshEnrolledCredentialsAction | AuthenticationControllerBeginCredentialEnrollmentAction | AuthenticationControllerCompleteCredentialEnrollmentAction | AuthenticationControllerBeginCredentialVerificationAction | AuthenticationControllerCompleteCredentialVerificationAction | AuthenticationControllerGetVerificationTokenAction | AuthenticationControllerClearVerificationSessionAction | AuthenticationControllerPerformSignOutAction | AuthenticationControllerClearStateAction | AuthenticationControllerGetBearerTokenAction | AuthenticationControllerGetSessionProfileAction | AuthenticationControllerRefreshCanonicalProfileIdAction | AuthenticationControllerGetUserProfileLineageAction | AuthenticationControllerGetCustomerServiceTokenAction | AuthenticationControllerGetPartnerIdentityTokenAction | AuthenticationControllerIsSignedInAction;
|
|
206
209
|
//# sourceMappingURL=AuthenticationController-method-action-types.d.ts.map
|
package/dist/controllers/authentication/AuthenticationController-method-action-types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthenticationController-method-action-types.d.ts","sourceRoot":"","sources":["../../../src/controllers/authentication/AuthenticationController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAE9E,MAAM,MAAM,2CAA2C,GAAG;IACxD,IAAI,EAAE,wCAAwC,CAAC;IAC/C,OAAO,EAAE,wBAAwB,CAAC,eAAe,CAAC,CAAC;CACpD,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,mDAAmD,GAAG;IAChE,IAAI,EAAE,gDAAgD,CAAC;IACvD,OAAO,EAAE,wBAAwB,CAAC,uBAAuB,CAAC,CAAC;CAC5D,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,wDAAwD,GAAG;IACrE,IAAI,EAAE,qDAAqD,CAAC;IAC5D,OAAO,EAAE,wBAAwB,CAAC,4BAA4B,CAAC,CAAC;CACjE,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,uDAAuD,GAAG;IACpE,IAAI,EAAE,oDAAoD,CAAC;IAC3D,OAAO,EAAE,wBAAwB,CAAC,2BAA2B,CAAC,CAAC;CAChE,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,0DAA0D,GAAG;IACvE,IAAI,EAAE,uDAAuD,CAAC;IAC9D,OAAO,EAAE,wBAAwB,CAAC,8BAA8B,CAAC,CAAC;CACnE,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"AuthenticationController-method-action-types.d.ts","sourceRoot":"","sources":["../../../src/controllers/authentication/AuthenticationController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAE9E,MAAM,MAAM,2CAA2C,GAAG;IACxD,IAAI,EAAE,wCAAwC,CAAC;IAC/C,OAAO,EAAE,wBAAwB,CAAC,eAAe,CAAC,CAAC;CACpD,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,mDAAmD,GAAG;IAChE,IAAI,EAAE,gDAAgD,CAAC;IACvD,OAAO,EAAE,wBAAwB,CAAC,uBAAuB,CAAC,CAAC;CAC5D,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,wDAAwD,GAAG;IACrE,IAAI,EAAE,qDAAqD,CAAC;IAC5D,OAAO,EAAE,wBAAwB,CAAC,4BAA4B,CAAC,CAAC;CACjE,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,uDAAuD,GAAG;IACpE,IAAI,EAAE,oDAAoD,CAAC;IAC3D,OAAO,EAAE,wBAAwB,CAAC,2BAA2B,CAAC,CAAC;CAChE,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,0DAA0D,GAAG;IACvE,IAAI,EAAE,uDAAuD,CAAC;IAC9D,OAAO,EAAE,wBAAwB,CAAC,8BAA8B,CAAC,CAAC;CACnE,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,yDAAyD,GAAG;IACtE,IAAI,EAAE,sDAAsD,CA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AAC,CAAC;CAChE,CAAC;AAEF,MAAM,MAAM,mDAAmD,GAAG;IAChE,IAAI,EAAE,gDAAgD,CAAC;IACvD,OAAO,EAAE,wBAAwB,CAAC,uBAAuB,CAAC,CAAC;CAC5D,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,qDAAqD,GAAG;IAClE,IAAI,EAAE,kDAAkD,CAAC;IACzD,OAAO,EAAE,wBAAwB,CAAC,yBAAyB,CAAC,CAAC;CAC9D,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,qDAAqD,GAAG;IAClE,IAAI,EAAE,kDAAkD,CAAC;IACzD,OAAO,EAAE,wBAAwB,CAAC,yBAAyB,CAAC,CAAC;CAC9D,CAAC;AAEF,MAAM,MAAM,wCAAwC,GAAG;IACrD,IAAI,EAAE,qCAAqC,CAAC;IAC5C,OAAO,EAAE,wBAAwB,CAAC,YAAY,CAAC,CAAC;CACjD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAC7C,2CAA2C,GAC3C,mDAAmD,GACnD,wDAAwD,GACxD,uDAAuD,GACvD,0DAA0D,GAC1D,yDAAyD,GACzD,4DAA4D,GAC5D,kDAAkD,GAClD,sDAAsD,GACtD,4CAA4C,GAC5C,wCAAwC,GACxC,4CAA4C,GAC5C,+CAA+C,GAC/C,uDAAuD,GACvD,mDAAmD,GACnD,qDAAqD,GACrD,qDAAqD,GACrD,wCAAwC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthenticationController-method-action-types.js","sourceRoot":"","sources":["../../../src/controllers/authentication/AuthenticationController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { AuthenticationController } from './AuthenticationController.js';\n\nexport type AuthenticationControllerPerformSignInAction = {\n type: `AuthenticationController:performSignIn`;\n handler: AuthenticationController['performSignIn'];\n};\n\n/**\n * Marks profile pairing as needed. Clients call this when the SRP set\n * changes (e.g. a new keyring was added) so the next auto-sign-in cycle\n * re-runs `performSignIn` and re-pairs.\n */\nexport type AuthenticationControllerRequestProfilePairingAction = {\n type: `AuthenticationController:requestProfilePairing`;\n handler: AuthenticationController['requestProfilePairing'];\n};\n\n/**\n * Refreshes credentials enrolled on the canonical profile.\n *\n * @returns The current supported credentials.\n */\nexport type AuthenticationControllerRefreshEnrolledCredentialsAction = {\n type: `AuthenticationController:refreshEnrolledCredentials`;\n handler: AuthenticationController['refreshEnrolledCredentials'];\n};\n\n/**\n * Begins enrollment of a passkey or email OTP credential.\n *\n * @param request - Credential, optional email address, and trace reason.\n * @returns A challenge for the client-owned ceremony.\n */\nexport type AuthenticationControllerBeginCredentialEnrollmentAction = {\n type: `AuthenticationController:beginCredentialEnrollment`;\n handler: AuthenticationController['beginCredentialEnrollment'];\n};\n\n/**\n * Completes credential enrollment and refreshes the credential cache.\n *\n * A cache-refresh failure does not undo successful enrollment. Email\n * enrollment invalidates the primary SRP session *after* refresh so the\n * credentials call can reuse the still-valid access token; the next token\n * fetch then includes the newly verified email claim. That invalidation\n * happens even if the session ends mid-request: the enrollment succeeded\n * on the server, so a token cached across a lock must not be reused\n * without the new claim.\n *\n * @param request - Flow identifier, platform or email proof, and trace reason.\n * @returns The refreshed credentials, or the existing cache if refresh fails.\n */\nexport type AuthenticationControllerCompleteCredentialEnrollmentAction = {\n type: `AuthenticationController:completeCredentialEnrollment`;\n handler: AuthenticationController['completeCredentialEnrollment'];\n};\n\n/**\n * Begins step-up verification with an enrolled credential.\n *\n * @param request - Credential type and trace reason.\n * @returns A challenge for the client-owned ceremony.\n */\nexport type AuthenticationControllerBeginStepUpAction = {\n type: `AuthenticationController:beginStepUp`;\n handler: AuthenticationController['beginStepUp'];\n};\n\n/**\n * Completes step-up verification and opens a short-lived elevated session.\n *\n * The AAL2 assertion returned by the MFA service is exchanged at Hydra for\n * an elevated access token, whose claims are checked before the session\n * opens. The token itself never enters controller state.\n *\n * @param request - Flow identifier, platform or email proof, and trace reason.\n * @returns The elevated profile access token.\n */\nexport type AuthenticationControllerCompleteStepUpAction = {\n type: `AuthenticationController:completeStepUp`;\n handler: AuthenticationController['completeStepUp'];\n};\n\n/**\n * Returns the active elevated token when it meets the requested freshness.\n *\n * @param request - Optional maximum session age in milliseconds, measured\n * from when the token was obtained. Zero always requires a new ceremony.\n * @returns A live elevated token, or null when no reusable session exists.\n */\nexport type AuthenticationControllerGetElevatedProfileTokenAction = {\n type: `AuthenticationController:getElevatedProfileToken`;\n handler: AuthenticationController['getElevatedProfileToken'];\n};\n\n/**\n * Clears the in-memory elevated session and its expiration timer.\n */\nexport type AuthenticationControllerClearStepUpSessionAction = {\n type: `AuthenticationController:clearStepUpSession`;\n handler: AuthenticationController['clearStepUpSession'];\n};\n\nexport type AuthenticationControllerPerformSignOutAction = {\n type: `AuthenticationController:performSignOut`;\n handler: AuthenticationController['performSignOut'];\n};\n\n/**\n * Resets the controller to `defaultState`. Clients call this on wallet reset\n * so the next wallet starts unsigned with both pairing gates re-armed.\n */\nexport type AuthenticationControllerClearStateAction = {\n type: `AuthenticationController:clearState`;\n handler: AuthenticationController['clearState'];\n};\n\n/**\n * Returns a bearer token for the specified SRP, logging in if needed.\n *\n * When called without `entropySourceId`, returns the primary (first) SRP's\n * access token, which is effectively the canonical\n * profile's token that can be used by alias-aware consumers for cross-SRP\n * operations.\n *\n * @param entropySourceId - The entropy source ID. Omit for the primary SRP.\n * @returns The OIDC access token.\n */\nexport type AuthenticationControllerGetBearerTokenAction = {\n type: `AuthenticationController:getBearerToken`;\n handler: AuthenticationController['getBearerToken'];\n};\n\n/**\n * Returns the cached session profile, logging in if no session exists.\n *\n * The returned `canonicalProfileId` reflects the value from the most recent\n * login or pairing. In the rare event where a canonical changed because of\n * a pairing that happened on another device, the cached value may be stale\n * until the next login. For guaranteed freshness, call\n * `refreshCanonicalProfileId()` before reading `canonicalProfileId`.\n *\n * @param entropySourceId - The entropy source ID used to derive the key,\n * when multiple sources are available (Multi-SRP).\n * @returns profile for the session.\n */\nexport type AuthenticationControllerGetSessionProfileAction = {\n type: `AuthenticationController:getSessionProfile`;\n handler: AuthenticationController['getSessionProfile'];\n};\n\n/**\n * Forces a fresh retrieval of the canonical profile ID from the server\n * and propagates it to all cached SRP sessions.\n *\n * This method invalidates the primary SRP's cached session and forces a\n * re-login. Use it before operations that require a guaranteed-fresh\n * canonical (e.g. storage key derivation for Accounts ADR 0005). For\n * best-effort reads, use\n * `getSessionProfile().canonicalProfileId` instead.\n *\n * Only the primary SRP is re-logged-in regardless of how many SRPs exist —\n * the server returns the current canonical for the entire pairing group\n * from any single SRP login.\n *\n * @returns The refreshed canonical profile ID.\n */\nexport type AuthenticationControllerRefreshCanonicalProfileIdAction = {\n type: `AuthenticationController:refreshCanonicalProfileId`;\n handler: AuthenticationController['refreshCanonicalProfileId'];\n};\n\nexport type AuthenticationControllerGetUserProfileLineageAction = {\n type: `AuthenticationController:getUserProfileLineage`;\n handler: AuthenticationController['getUserProfileLineage'];\n};\n\n/**\n * Returns a Customer Service specific access token for the specified SRP,\n * logging in if needed.\n *\n * Exchanges the OIDC access token for a short-lived token scoped to the\n * customer-service audience. Customer Service tooling consumes this token to\n * identify and authenticate the user.\n *\n * @param entropySourceId - The entropy source ID. Omit for the primary SRP.\n * @returns The customer-service access token.\n */\nexport type AuthenticationControllerGetCustomerServiceTokenAction = {\n type: `AuthenticationController:getCustomerServiceToken`;\n handler: AuthenticationController['getCustomerServiceToken'];\n};\n\n/**\n * Mints a partner identity token for the specified SRP, logging in if needed.\n *\n * Calls `POST /api/v2/oidc/token` with the Hydra login bearer and returns\n * the minted `access_token`. Email on live tokens is under JWT `ext`.\n * HTTP 422 throws `EmailRequiredError` when this profile has no\n * verified email.\n *\n * @param claims - Claim names to embed. Only `email` is supported.\n * @param audience - Partner audience (`kyc` or `iron`).\n * @param entropySourceId - The entropy source ID. Omit for the primary SRP.\n * @returns The partner identity access token.\n */\nexport type AuthenticationControllerGetPartnerIdentityTokenAction = {\n type: `AuthenticationController:getPartnerIdentityToken`;\n handler: AuthenticationController['getPartnerIdentityToken'];\n};\n\nexport type AuthenticationControllerIsSignedInAction = {\n type: `AuthenticationController:isSignedIn`;\n handler: AuthenticationController['isSignedIn'];\n};\n\n/**\n * Union of all AuthenticationController action types.\n */\nexport type AuthenticationControllerMethodActions =\n | AuthenticationControllerPerformSignInAction\n | AuthenticationControllerRequestProfilePairingAction\n | AuthenticationControllerRefreshEnrolledCredentialsAction\n | AuthenticationControllerBeginCredentialEnrollmentAction\n | AuthenticationControllerCompleteCredentialEnrollmentAction\n | AuthenticationControllerBeginStepUpAction\n | AuthenticationControllerCompleteStepUpAction\n | AuthenticationControllerGetElevatedProfileTokenAction\n | AuthenticationControllerClearStepUpSessionAction\n | AuthenticationControllerPerformSignOutAction\n | AuthenticationControllerClearStateAction\n | AuthenticationControllerGetBearerTokenAction\n | AuthenticationControllerGetSessionProfileAction\n | AuthenticationControllerRefreshCanonicalProfileIdAction\n | AuthenticationControllerGetUserProfileLineageAction\n | AuthenticationControllerGetCustomerServiceTokenAction\n | AuthenticationControllerGetPartnerIdentityTokenAction\n | AuthenticationControllerIsSignedInAction;\n"]}
|
|
1
|
+
{"version":3,"file":"AuthenticationController-method-action-types.js","sourceRoot":"","sources":["../../../src/controllers/authentication/AuthenticationController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { AuthenticationController } from './AuthenticationController.js';\n\nexport type AuthenticationControllerPerformSignInAction = {\n type: `AuthenticationController:performSignIn`;\n handler: AuthenticationController['performSignIn'];\n};\n\n/**\n * Marks profile pairing as needed. Clients call this when the SRP set\n * changes (e.g. a new keyring was added) so the next auto-sign-in cycle\n * re-runs `performSignIn` and re-pairs.\n */\nexport type AuthenticationControllerRequestProfilePairingAction = {\n type: `AuthenticationController:requestProfilePairing`;\n handler: AuthenticationController['requestProfilePairing'];\n};\n\n/**\n * Refreshes credentials enrolled on the canonical profile.\n *\n * @returns The current supported credentials.\n */\nexport type AuthenticationControllerRefreshEnrolledCredentialsAction = {\n type: `AuthenticationController:refreshEnrolledCredentials`;\n handler: AuthenticationController['refreshEnrolledCredentials'];\n};\n\n/**\n * Begins enrollment of a passkey or email OTP credential.\n *\n * @param request - Credential, optional email address, and trace reason.\n * @returns A challenge for the client-owned ceremony.\n */\nexport type AuthenticationControllerBeginCredentialEnrollmentAction = {\n type: `AuthenticationController:beginCredentialEnrollment`;\n handler: AuthenticationController['beginCredentialEnrollment'];\n};\n\n/**\n * Completes credential enrollment and refreshes the credential cache.\n *\n * A cache-refresh failure does not undo successful enrollment. Email\n * enrollment invalidates the primary SRP session *after* refresh so the\n * credentials call can reuse the still-valid access token; the next token\n * fetch then includes the newly verified email claim. That invalidation\n * happens even if the session ends mid-request: the enrollment succeeded\n * on the server, so a token cached across a lock must not be reused\n * without the new claim.\n *\n * @param request - Flow identifier, platform or email proof, and trace reason.\n * @returns The refreshed credentials, or the existing cache if refresh fails.\n */\nexport type AuthenticationControllerCompleteCredentialEnrollmentAction = {\n type: `AuthenticationController:completeCredentialEnrollment`;\n handler: AuthenticationController['completeCredentialEnrollment'];\n};\n\n/**\n * Begins verification with an enrolled credential.\n *\n * @param request - Credential type and trace reason.\n * @returns A challenge for the client-owned ceremony.\n */\nexport type AuthenticationControllerBeginCredentialVerificationAction = {\n type: `AuthenticationController:beginCredentialVerification`;\n handler: AuthenticationController['beginCredentialVerification'];\n};\n\n/**\n * Completes verification and opens a short-lived verification session.\n *\n * The assertion returned by the MFA service is exchanged at Hydra for an\n * access token. Its assurance level is not checked: the services receiving\n * the token enforce their own requirements. The token itself never enters\n * controller state.\n *\n * @param request - Flow identifier, platform or email proof, and trace reason.\n * @returns The verification token.\n */\nexport type AuthenticationControllerCompleteCredentialVerificationAction = {\n type: `AuthenticationController:completeCredentialVerification`;\n handler: AuthenticationController['completeCredentialVerification'];\n};\n\n/**\n * Returns the active verification token when it meets the requested\n * freshness.\n *\n * @param request - Optional maximum session age in milliseconds, measured\n * from when the token was obtained. Zero always requires a new ceremony.\n * @returns A live verification token, or null when no reusable session\n * exists.\n */\nexport type AuthenticationControllerGetVerificationTokenAction = {\n type: `AuthenticationController:getVerificationToken`;\n handler: AuthenticationController['getVerificationToken'];\n};\n\n/**\n * Clears every in-memory verification session and its expiration timer.\n */\nexport type AuthenticationControllerClearVerificationSessionAction = {\n type: `AuthenticationController:clearVerificationSession`;\n handler: AuthenticationController['clearVerificationSession'];\n};\n\nexport type AuthenticationControllerPerformSignOutAction = {\n type: `AuthenticationController:performSignOut`;\n handler: AuthenticationController['performSignOut'];\n};\n\n/**\n * Resets the controller to `defaultState`. Clients call this on wallet reset\n * so the next wallet starts unsigned with both pairing gates re-armed.\n */\nexport type AuthenticationControllerClearStateAction = {\n type: `AuthenticationController:clearState`;\n handler: AuthenticationController['clearState'];\n};\n\n/**\n * Returns a bearer token for the specified SRP, logging in if needed.\n *\n * When called without `entropySourceId`, returns the primary (first) SRP's\n * access token, which is effectively the canonical\n * profile's token that can be used by alias-aware consumers for cross-SRP\n * operations.\n *\n * @param entropySourceId - The entropy source ID. Omit for the primary SRP.\n * @returns The OIDC access token.\n */\nexport type AuthenticationControllerGetBearerTokenAction = {\n type: `AuthenticationController:getBearerToken`;\n handler: AuthenticationController['getBearerToken'];\n};\n\n/**\n * Returns the cached session profile, logging in if no session exists.\n *\n * The returned `canonicalProfileId` reflects the value from the most recent\n * login or pairing. In the rare event where a canonical changed because of\n * a pairing that happened on another device, the cached value may be stale\n * until the next login. For guaranteed freshness, call\n * `refreshCanonicalProfileId()` before reading `canonicalProfileId`.\n *\n * @param entropySourceId - The entropy source ID used to derive the key,\n * when multiple sources are available (Multi-SRP).\n * @returns profile for the session.\n */\nexport type AuthenticationControllerGetSessionProfileAction = {\n type: `AuthenticationController:getSessionProfile`;\n handler: AuthenticationController['getSessionProfile'];\n};\n\n/**\n * Forces a fresh retrieval of the canonical profile ID from the server\n * and propagates it to all cached SRP sessions.\n *\n * This method invalidates the primary SRP's cached session and forces a\n * re-login. Use it before operations that require a guaranteed-fresh\n * canonical (e.g. storage key derivation for Accounts ADR 0005). For\n * best-effort reads, use\n * `getSessionProfile().canonicalProfileId` instead.\n *\n * Only the primary SRP is re-logged-in regardless of how many SRPs exist —\n * the server returns the current canonical for the entire pairing group\n * from any single SRP login.\n *\n * @returns The refreshed canonical profile ID.\n */\nexport type AuthenticationControllerRefreshCanonicalProfileIdAction = {\n type: `AuthenticationController:refreshCanonicalProfileId`;\n handler: AuthenticationController['refreshCanonicalProfileId'];\n};\n\nexport type AuthenticationControllerGetUserProfileLineageAction = {\n type: `AuthenticationController:getUserProfileLineage`;\n handler: AuthenticationController['getUserProfileLineage'];\n};\n\n/**\n * Returns a Customer Service specific access token for the specified SRP,\n * logging in if needed.\n *\n * Exchanges the OIDC access token for a short-lived token scoped to the\n * customer-service audience. Customer Service tooling consumes this token to\n * identify and authenticate the user.\n *\n * @param entropySourceId - The entropy source ID. Omit for the primary SRP.\n * @returns The customer-service access token.\n */\nexport type AuthenticationControllerGetCustomerServiceTokenAction = {\n type: `AuthenticationController:getCustomerServiceToken`;\n handler: AuthenticationController['getCustomerServiceToken'];\n};\n\n/**\n * Mints a partner identity token for the specified SRP, logging in if needed.\n *\n * Calls `POST /api/v2/oidc/token` with the Hydra login bearer and returns\n * the minted `access_token`. Email on live tokens is under JWT `ext`.\n * HTTP 422 throws `EmailRequiredError` when this profile has no\n * verified email.\n *\n * @param claims - Claim names to embed. Only `email` is supported.\n * @param audience - Partner audience (`kyc` or `iron`).\n * @param entropySourceId - The entropy source ID. Omit for the primary SRP.\n * @returns The partner identity access token.\n */\nexport type AuthenticationControllerGetPartnerIdentityTokenAction = {\n type: `AuthenticationController:getPartnerIdentityToken`;\n handler: AuthenticationController['getPartnerIdentityToken'];\n};\n\nexport type AuthenticationControllerIsSignedInAction = {\n type: `AuthenticationController:isSignedIn`;\n handler: AuthenticationController['isSignedIn'];\n};\n\n/**\n * Union of all AuthenticationController action types.\n */\nexport type AuthenticationControllerMethodActions =\n | AuthenticationControllerPerformSignInAction\n | AuthenticationControllerRequestProfilePairingAction\n | AuthenticationControllerRefreshEnrolledCredentialsAction\n | AuthenticationControllerBeginCredentialEnrollmentAction\n | AuthenticationControllerCompleteCredentialEnrollmentAction\n | AuthenticationControllerBeginCredentialVerificationAction\n | AuthenticationControllerCompleteCredentialVerificationAction\n | AuthenticationControllerGetVerificationTokenAction\n | AuthenticationControllerClearVerificationSessionAction\n | AuthenticationControllerPerformSignOutAction\n | AuthenticationControllerClearStateAction\n | AuthenticationControllerGetBearerTokenAction\n | AuthenticationControllerGetSessionProfileAction\n | AuthenticationControllerRefreshCanonicalProfileIdAction\n | AuthenticationControllerGetUserProfileLineageAction\n | AuthenticationControllerGetCustomerServiceTokenAction\n | AuthenticationControllerGetPartnerIdentityTokenAction\n | AuthenticationControllerIsSignedInAction;\n"]}
|
|
@@ -4,7 +4,7 @@ import type { TraceCallback } from '@metamask/controller-utils';
|
|
|
4
4
|
import type { KeyringControllerGetStateAction, KeyringControllerLockEvent, KeyringControllerUnlockEvent, KeyringControllerWithKeyringV2UnsafeAction } from '@metamask/keyring-controller';
|
|
5
5
|
import type { Messenger } from '@metamask/messenger';
|
|
6
6
|
import type { SeedlessOnboardingControllerGetAccessTokenAction, SeedlessOnboardingControllerGetStateAction } from '@metamask/seedless-onboarding-controller';
|
|
7
|
-
import type { LoginResponse, ProfileAlias, UserProfile, UserProfileLineage, OidcTokenAudience, OidcTokenClaims, BeginEnrollmentRequest, CompleteEnrollmentRequest, EnrolledCredential, EnrollmentChallenge,
|
|
7
|
+
import type { LoginResponse, ProfileAlias, UserProfile, UserProfileLineage, OidcTokenAudience, OidcTokenClaims, BeginEnrollmentRequest, CompleteEnrollmentRequest, EnrolledCredential, EnrollmentChallenge, BeginVerificationRequest, CompleteVerificationRequest, VerificationToken, GetVerificationTokenRequest, VerificationChallenge } from '../../sdk/index.js';
|
|
8
8
|
import { Env } from '../../sdk/index.js';
|
|
9
9
|
import type { MetaMetricsAuth } from '../../shared/types/services.js';
|
|
10
10
|
import { AuthenticationControllerMethodActions } from './AuthenticationController-method-action-types.js';
|
|
@@ -19,10 +19,10 @@ export type AuthenticationControllerState = {
|
|
|
19
19
|
*/
|
|
20
20
|
enrolledCredentials?: EnrolledCredential[];
|
|
21
21
|
/**
|
|
22
|
-
* Epoch-ms hard expiry of the in-memory
|
|
23
|
-
* none is open. Lets UI show "verified" state without holding the token.
|
|
22
|
+
* Epoch-ms hard expiry of the in-memory verification session, or undefined
|
|
23
|
+
* when none is open. Lets UI show "verified" state without holding the token.
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
verificationSessionExpiresAt?: number;
|
|
26
26
|
/**
|
|
27
27
|
* Client gate for profile pairing. Defaults to `true` (fresh install /
|
|
28
28
|
* upgrade), set to `false` after a successful `performSignIn` pair, set
|
|
@@ -51,11 +51,20 @@ export type AuthenticationControllerState = {
|
|
|
51
51
|
};
|
|
52
52
|
export declare const defaultState: AuthenticationControllerState;
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
54
|
+
* Upper bound on a verification session's lifetime. The session also ends at
|
|
55
|
+
* the verification token's own `exp` (15 minutes today), whichever comes
|
|
56
|
+
* first, so this only matters if the server ever issues longer-lived tokens.
|
|
57
|
+
* Callers needing a fresher proof pass `maxSessionAgeMs` to
|
|
58
|
+
* `getVerificationToken`.
|
|
57
59
|
*/
|
|
58
|
-
export declare const
|
|
60
|
+
export declare const VERIFICATION_SESSION_TTL_MS: number;
|
|
61
|
+
/**
|
|
62
|
+
* Default maximum age of a verification session that may authorize enrolling a
|
|
63
|
+
* credential. A session opened for an unrelated operation must not be able to
|
|
64
|
+
* add a factor long after the fact, while a session proven moments ago (or
|
|
65
|
+
* during the same setup flow, via `maxSessionAgeMs`) may.
|
|
66
|
+
*/
|
|
67
|
+
export declare const ENROLLMENT_MAX_SESSION_AGE_MS: number;
|
|
59
68
|
type ControllerConfig = {
|
|
60
69
|
env: Env;
|
|
61
70
|
/**
|
|
@@ -134,35 +143,38 @@ export declare class AuthenticationController extends BaseController<typeof cont
|
|
|
134
143
|
*/
|
|
135
144
|
completeCredentialEnrollment(request: CompleteEnrollmentRequest): Promise<EnrolledCredential[]>;
|
|
136
145
|
/**
|
|
137
|
-
* Begins
|
|
146
|
+
* Begins verification with an enrolled credential.
|
|
138
147
|
*
|
|
139
148
|
* @param request - Credential type and trace reason.
|
|
140
149
|
* @returns A challenge for the client-owned ceremony.
|
|
141
150
|
*/
|
|
142
|
-
|
|
151
|
+
beginCredentialVerification(request: BeginVerificationRequest): Promise<VerificationChallenge>;
|
|
143
152
|
/**
|
|
144
|
-
* Completes
|
|
153
|
+
* Completes verification and opens a short-lived verification session.
|
|
145
154
|
*
|
|
146
|
-
* The
|
|
147
|
-
*
|
|
148
|
-
*
|
|
155
|
+
* The assertion returned by the MFA service is exchanged at Hydra for an
|
|
156
|
+
* access token. Its assurance level is not checked: the services receiving
|
|
157
|
+
* the token enforce their own requirements. The token itself never enters
|
|
158
|
+
* controller state.
|
|
149
159
|
*
|
|
150
160
|
* @param request - Flow identifier, platform or email proof, and trace reason.
|
|
151
|
-
* @returns The
|
|
161
|
+
* @returns The verification token.
|
|
152
162
|
*/
|
|
153
|
-
|
|
163
|
+
completeCredentialVerification(request: CompleteVerificationRequest): Promise<VerificationToken>;
|
|
154
164
|
/**
|
|
155
|
-
* Returns the active
|
|
165
|
+
* Returns the active verification token when it meets the requested
|
|
166
|
+
* freshness.
|
|
156
167
|
*
|
|
157
168
|
* @param request - Optional maximum session age in milliseconds, measured
|
|
158
169
|
* from when the token was obtained. Zero always requires a new ceremony.
|
|
159
|
-
* @returns A live
|
|
170
|
+
* @returns A live verification token, or null when no reusable session
|
|
171
|
+
* exists.
|
|
160
172
|
*/
|
|
161
|
-
|
|
173
|
+
getVerificationToken(request?: GetVerificationTokenRequest): VerificationToken | null;
|
|
162
174
|
/**
|
|
163
|
-
* Clears
|
|
175
|
+
* Clears every in-memory verification session and its expiration timer.
|
|
164
176
|
*/
|
|
165
|
-
|
|
177
|
+
clearVerificationSession(): void;
|
|
166
178
|
performSignOut(): void;
|
|
167
179
|
/**
|
|
168
180
|
* Resets the controller to `defaultState`. Clients call this on wallet reset
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthenticationController.d.ts","sourceRoot":"","sources":["../../../src/controllers/authentication/AuthenticationController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAE3B,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,4BAA4B,CAAC;AAE9E,OAAO,KAAK,EACV,+BAA+B,EAC/B,0BAA0B,EAC1B,4BAA4B,EAC5B,0CAA0C,EAC3C,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EACV,gDAAgD,EAChD,0CAA0C,EAC3C,MAAM,0CAA0C,CAAC;AAYlD,OAAO,KAAK,EAEV,aAAa,EACb,YAAY,EAIZ,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,sBAAsB,EACtB,yBAAyB,EACzB,kBAAkB,EAClB,mBAAmB,EACnB,
|
|
1
|
+
{"version":3,"file":"AuthenticationController.d.ts","sourceRoot":"","sources":["../../../src/controllers/authentication/AuthenticationController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAE3B,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,4BAA4B,CAAC;AAE9E,OAAO,KAAK,EACV,+BAA+B,EAC/B,0BAA0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