@@ -32,22 +32,25 @@ final class RespondToAuthChallengeRequest extends Input
3232 * Possible challenges include the following:
3333 *
3434 * > All of the following challenges require `USERNAME` and, when the app client has a client secret, `SECRET_HASH` in
35- * > the parameters.
35+ * > the parameters. Include a `DEVICE_KEY` for device authentication.
3636 *
3737 * - `WEB_AUTHN`: Respond to the challenge with the results of a successful authentication with a WebAuthn
38- * authenticator, or passkey. Examples of WebAuthn authenticators include biometric devices and security keys.
39- * - `PASSWORD`: Respond with `USER_PASSWORD_AUTH` parameters: `USERNAME` (required), `PASSWORD` (required),
40- * `SECRET_HASH` (required if the app client is configured with a client secret), `DEVICE_KEY`.
41- * - `PASSWORD_SRP`: Respond with `USER_SRP_AUTH` parameters: `USERNAME` (required), `SRP_A` (required), `SECRET_HASH`
42- * (required if the app client is configured with a client secret), `DEVICE_KEY`.
43- * - `SELECT_CHALLENGE`: Respond to the challenge with `USERNAME` and an `ANSWER` that matches one of the challenge
44- * types in the `AvailableChallenges` response parameter.
45- * - `SMS_MFA`: Respond with an `SMS_MFA_CODE` that your user pool delivered in an SMS message.
46- * - `EMAIL_OTP`: Respond with an `EMAIL_OTP_CODE` that your user pool delivered in an email message.
47- * - `PASSWORD_VERIFIER`: Respond with `PASSWORD_CLAIM_SIGNATURE`, `PASSWORD_CLAIM_SECRET_BLOCK`, and `TIMESTAMP` after
48- * client-side SRP calculations.
38+ * authenticator, or passkey, as `CREDENTIAL`. Examples of WebAuthn authenticators include biometric devices and
39+ * security keys.
40+ * - `PASSWORD`: Respond with the user's password as `PASSWORD`.
41+ * - `PASSWORD_SRP`: Respond with the initial SRP secret as `SRP_A`.
42+ * - `SELECT_CHALLENGE`: Respond with a challenge selection as `ANSWER`. It must be one of the challenge types in the
43+ * `AvailableChallenges` response parameter. Add the parameters of the selected challenge, for example `USERNAME` and
44+ * `SMS_OTP`.
45+ * - `SMS_MFA`: Respond with the code that your user pool delivered in an SMS message, as `SMS_MFA_CODE`
46+ * - `EMAIL_MFA`: Respond with the code that your user pool delivered in an email message, as `EMAIL_MFA_CODE`
47+ * - `EMAIL_OTP`: Respond with the code that your user pool delivered in an email message, as `EMAIL_OTP_CODE` .
48+ * - `SMS_OTP`: Respond with the code that your user pool delivered in an SMS message, as `SMS_OTP_CODE`.
49+ * - `PASSWORD_VERIFIER`: Respond with the second stage of SRP secrets as `PASSWORD_CLAIM_SIGNATURE`,
50+ * `PASSWORD_CLAIM_SECRET_BLOCK`, and `TIMESTAMP`.
4951 * - `CUSTOM_CHALLENGE`: This is returned if your custom authentication flow determines that the user should pass
50- * another challenge before tokens are issued. The parameters of the challenge are determined by your Lambda function.
52+ * another challenge before tokens are issued. The parameters of the challenge are determined by your Lambda function
53+ * and issued in the `ChallengeParameters` of a challenge response.
5154 * - `DEVICE_SRP_AUTH`: Respond with the initial parameters of device SRP authentication. For more information, see
5255 * Signing in with a device [^1].
5356 * - `DEVICE_PASSWORD_VERIFIER`: Respond with `PASSWORD_CLAIM_SIGNATURE`, `PASSWORD_CLAIM_SECRET_BLOCK`, and `TIMESTAMP`
@@ -127,6 +130,18 @@ final class RespondToAuthChallengeRequest extends Input
127130 * - `"ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": "SMS_OTP", "USERNAME": "[username]"}`
128131 * - `"ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": "EMAIL_OTP", "USERNAME": "[username]"}`
129132 *
133+ * - `WEB_AUTHN`:
134+ *
135+ * `"ChallengeName": "WEB_AUTHN", "ChallengeResponses": { "USERNAME": "[username]", "CREDENTIAL":
136+ * "[AuthenticationResponseJSON]"}`
137+ *
138+ * See AuthenticationResponseJSON [^2].
139+ * - `PASSWORD`:
140+ *
141+ * `"ChallengeName": "PASSWORD", "ChallengeResponses": { "USERNAME": "[username]", "PASSWORD": "[password]"}`
142+ * - `PASSWORD_SRP`:
143+ *
144+ * `"ChallengeName": "PASSWORD_SRP", "ChallengeResponses": { "USERNAME": "[username]", "SRP_A": "[SRP_A]"}`
130145 * - `SMS_OTP`:
131146 *
132147 * `"ChallengeName": "SMS_OTP", "ChallengeResponses": {"SMS_OTP_CODE": "[code]", "USERNAME": "[username]"}`
@@ -144,14 +159,10 @@ final class RespondToAuthChallengeRequest extends Input
144159 *
145160 * `"ChallengeName": "PASSWORD_VERIFIER", "ChallengeResponses": {"PASSWORD_CLAIM_SIGNATURE": "[claim_signature]",
146161 * "PASSWORD_CLAIM_SECRET_BLOCK": "[secret_block]", "TIMESTAMP": [timestamp], "USERNAME": "[username]"}`
147- *
148- * Add `"DEVICE_KEY"` when you sign in with a remembered device.
149162 * - `CUSTOM_CHALLENGE`:
150163 *
151164 * `"ChallengeName": "CUSTOM_CHALLENGE", "ChallengeResponses": {"USERNAME": "[username]", "ANSWER":
152165 * "[challenge_answer]"}`
153- *
154- * Add `"DEVICE_KEY"` when you sign in with a remembered device.
155166 * - `NEW_PASSWORD_REQUIRED`:
156167 *
157168 * `"ChallengeName": "NEW_PASSWORD_REQUIRED", "ChallengeResponses": {"NEW_PASSWORD": "[new_password]", "USERNAME":
@@ -185,15 +196,16 @@ final class RespondToAuthChallengeRequest extends Input
185196 * VerifySoftwareToken]"`
186197 * - `SELECT_MFA_TYPE`:
187198 *
188- * `"ChallengeName": "SELECT_MFA_TYPE", "ChallengeResponses": {"USERNAME": "[username]", "ANSWER": "[SMS_MFA or
189- * SOFTWARE_TOKEN_MFA]"}`
199+ * `"ChallengeName": "SELECT_MFA_TYPE", "ChallengeResponses": {"USERNAME": "[username]", "ANSWER":
200+ * "[SMS_MFA|EMAIL_MFA| SOFTWARE_TOKEN_MFA]"}`
190201 *
191- * For more information about `SECRET_HASH`, see Computing secret hash values [^2 ]. For information about `DEVICE_KEY`,
192- * see Working with user devices in your user pool [^3 ].
202+ * For more information about `SECRET_HASH`, see Computing secret hash values [^3 ]. For information about `DEVICE_KEY`,
203+ * see Working with user devices in your user pool [^4 ].
193204 *
194205 * [^1]: https://www.w3.org/TR/WebAuthn-3/#dictdef-authenticationresponsejson
195- * [^2]: https://docs.aws.amazon.com/cognito/latest/developerguide/signing-up-users-in-your-app.html#cognito-user-pools-computing-secret-hash
196- * [^3]: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-device-tracking.html
206+ * [^2]: https://www.w3.org/TR/WebAuthn-3/#dictdef-authenticationresponsejson
207+ * [^3]: https://docs.aws.amazon.com/cognito/latest/developerguide/signing-up-users-in-your-app.html#cognito-user-pools-computing-secret-hash
208+ * [^4]: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-device-tracking.html
197209 *
198210 * @var array<string, string>|null
199211 */
0 commit comments