Skip to content

Commit ba432c2

Browse files
Update generated code (#1935)
update generated code
1 parent e9607fd commit ba432c2

File tree

9 files changed

+155
-94
lines changed

9 files changed

+155
-94
lines changed

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"variables": {
3-
"${LATEST}": "3.354.0"
3+
"${LATEST}": "3.356.1"
44
},
55
"endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json",
66
"services": {

src/Service/CognitoIdentityProvider/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## NOT RELEASED
44

5+
### Changed
6+
7+
- AWS enhancement: Documentation updates.
8+
59
## 1.15.0
610

711
### Added

src/Service/CognitoIdentityProvider/src/CognitoIdentityProviderClient.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -668,8 +668,10 @@ public function adminRemoveUserFromGroup($input): Result
668668
}
669669

670670
/**
671-
* Resets the specified user's password in a user pool. This operation doesn't change the user's password, but sends a
672-
* password-reset code.
671+
* Begins the password reset process. Sets the requested user’s account into a `RESET_REQUIRED` status, and sends them
672+
* a password-reset code. Your user pool also sends the user a notification with a reset code and the information that
673+
* their password has been reset. At sign-in, your application or the managed login session receives a challenge to
674+
* complete the reset by confirming the code and setting a new password.
673675
*
674676
* To use this API operation, your user pool must have self-service account recovery configured.
675677
*
@@ -1275,9 +1277,11 @@ public function createGroup($input): CreateGroupResponse
12751277
}
12761278

12771279
/**
1278-
* Sends a password-reset confirmation code for the currently signed-in user.
1280+
* Sends a password-reset confirmation code to the email address or phone number of the requested username. The message
1281+
* delivery method is determined by the user's available attributes and the `AccountRecoverySetting` configuration of
1282+
* the user pool.
12791283
*
1280-
* For the `Username` parameter, you can use the username or user alias.
1284+
* For the `Username` parameter, you can use the username or an email, phone, or preferred username alias.
12811285
*
12821286
* If neither a verified phone number nor a verified email exists, Amazon Cognito responds with an
12831287
* `InvalidParameterException` error . If your app client has a client secret and you don't provide a `SECRET_HASH`

src/Service/CognitoIdentityProvider/src/Input/AdminInitiateAuthRequest.php

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -74,21 +74,37 @@ final class AdminInitiateAuthRequest extends Input
7474
private $authFlow;
7575

7676
/**
77-
* The authentication parameters. These are inputs corresponding to the `AuthFlow` that you're invoking. The required
78-
* values depend on the value of `AuthFlow` for example:
79-
*
80-
* - For `USER_AUTH`: `USERNAME` (required), `PREFERRED_CHALLENGE`. If you don't provide a value for
81-
* `PREFERRED_CHALLENGE`, Amazon Cognito responds with the `AvailableChallenges` parameter that specifies the
82-
* available sign-in methods.
83-
* - For `USER_SRP_AUTH`: `USERNAME` (required), `SRP_A` (required), `SECRET_HASH` (required if the app client is
84-
* configured with a client secret), `DEVICE_KEY`.
85-
* - For `ADMIN_USER_PASSWORD_AUTH`: `USERNAME` (required), `PASSWORD` (required), `SECRET_HASH` (required if the app
86-
* client is configured with a client secret), `DEVICE_KEY`.
87-
* - For `REFRESH_TOKEN_AUTH/REFRESH_TOKEN`: `REFRESH_TOKEN` (required), `SECRET_HASH` (required if the app client is
88-
* configured with a client secret), `DEVICE_KEY`.
89-
* - For `CUSTOM_AUTH`: `USERNAME` (required), `SECRET_HASH` (if app client is configured with client secret),
90-
* `DEVICE_KEY`. To start the authentication flow with password verification, include `ChallengeName: SRP_A` and
91-
* `SRP_A: (The SRP_A Value)`.
77+
* The authentication parameters. These are inputs corresponding to the `AuthFlow` that you're invoking.
78+
*
79+
* The following are some authentication flows and their parameters. Add a `SECRET_HASH` parameter if your app client
80+
* has a client secret. Add `DEVICE_KEY` if you want to bypass multi-factor authentication with a remembered device.
81+
*
82+
* - `USER_AUTH`:
83+
*
84+
* - `USERNAME` (required)
85+
* - `PREFERRED_CHALLENGE`. If you don't provide a value for `PREFERRED_CHALLENGE`, Amazon Cognito responds with the
86+
* `AvailableChallenges` parameter that specifies the available sign-in methods.
87+
*
88+
* - `USER_SRP_AUTH`:
89+
*
90+
* - `USERNAME` (required)
91+
* - `SRP_A` (required)
92+
*
93+
* - `ADMIN_USER_PASSWORD_AUTH`:
94+
*
95+
* - `USERNAME` (required)
96+
* - `PASSWORD` (required)
97+
*
98+
* - `REFRESH_TOKEN_AUTH/REFRESH_TOKEN`:
99+
*
100+
* - `REFRESH_TOKEN`(required)
101+
*
102+
* - `CUSTOM_AUTH`:
103+
*
104+
* - `USERNAME` (required)
105+
* - `ChallengeName: SRP_A` (when preceding custom authentication with SRP authentication)
106+
* - `SRP_A: (An SRP_A value)` (when preceding custom authentication with SRP authentication)
107+
*
92108
*
93109
* For more information about `SECRET_HASH`, see Computing secret hash values [^1]. For information about `DEVICE_KEY`,
94110
* see Working with user devices in your user pool [^2].

src/Service/CognitoIdentityProvider/src/Input/InitiateAuthRequest.php

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,35 @@ final class InitiateAuthRequest extends Input
6161
/**
6262
* The authentication parameters. These are inputs corresponding to the `AuthFlow` that you're invoking.
6363
*
64-
* The required values are specific to the InitiateAuthRequest$AuthFlow.
65-
*
6664
* The following are some authentication flows and their parameters. Add a `SECRET_HASH` parameter if your app client
67-
* has a client secret.
68-
*
69-
* - `USER_AUTH`: `USERNAME` (required), `PREFERRED_CHALLENGE`. If you don't provide a value for `PREFERRED_CHALLENGE`,
70-
* Amazon Cognito responds with the `AvailableChallenges` parameter that specifies the available sign-in methods.
71-
* - `USER_SRP_AUTH`: `USERNAME` (required), `SRP_A` (required), `DEVICE_KEY`.
72-
* - `USER_PASSWORD_AUTH`: `USERNAME` (required), `PASSWORD` (required), `DEVICE_KEY`.
73-
* - `REFRESH_TOKEN_AUTH/REFRESH_TOKEN`: `REFRESH_TOKEN` (required), `DEVICE_KEY`.
74-
* - `CUSTOM_AUTH`: `USERNAME` (required), `SECRET_HASH` (if app client is configured with client secret), `DEVICE_KEY`.
75-
* To start the authentication flow with password verification, include `ChallengeName: SRP_A` and `SRP_A: (The SRP_A
76-
* Value)`.
65+
* has a client secret. Add `DEVICE_KEY` if you want to bypass multi-factor authentication with a remembered device.
66+
*
67+
* - `USER_AUTH`:
68+
*
69+
* - `USERNAME` (required)
70+
* - `PREFERRED_CHALLENGE`. If you don't provide a value for `PREFERRED_CHALLENGE`, Amazon Cognito responds with the
71+
* `AvailableChallenges` parameter that specifies the available sign-in methods.
72+
*
73+
* - `USER_SRP_AUTH`:
74+
*
75+
* - `USERNAME` (required)
76+
* - `SRP_A` (required)
77+
*
78+
* - `USER_PASSWORD_AUTH`:
79+
*
80+
* - `USERNAME` (required)
81+
* - `PASSWORD` (required)
82+
*
83+
* - `REFRESH_TOKEN_AUTH/REFRESH_TOKEN`:
84+
*
85+
* - `REFRESH_TOKEN`(required)
86+
*
87+
* - `CUSTOM_AUTH`:
88+
*
89+
* - `USERNAME` (required)
90+
* - `ChallengeName: SRP_A` (when doing SRP authentication before custom challenges)
91+
* - `SRP_A: (An SRP_A value)` (when doing SRP authentication before custom challenges)
92+
*
7793
*
7894
* For more information about `SECRET_HASH`, see Computing secret hash values [^1]. For information about `DEVICE_KEY`,
7995
* see Working with user devices in your user pool [^2].

src/Service/CognitoIdentityProvider/src/Input/RespondToAuthChallengeRequest.php

Lines changed: 35 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -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
*/

src/Service/CognitoIdentityProvider/src/Result/AdminInitiateAuthResponse.php

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,25 @@ class AdminInitiateAuthResponse extends Result
2020
* Possible challenges include the following:
2121
*
2222
* > All of the following challenges require `USERNAME` and, when the app client has a client secret, `SECRET_HASH` in
23-
* > the parameters.
23+
* > the parameters. Include a `DEVICE_KEY` for device authentication.
2424
*
2525
* - `WEB_AUTHN`: Respond to the challenge with the results of a successful authentication with a WebAuthn
26-
* authenticator, or passkey. Examples of WebAuthn authenticators include biometric devices and security keys.
27-
* - `PASSWORD`: Respond with `USER_PASSWORD_AUTH` parameters: `USERNAME` (required), `PASSWORD` (required),
28-
* `SECRET_HASH` (required if the app client is configured with a client secret), `DEVICE_KEY`.
29-
* - `PASSWORD_SRP`: Respond with `USER_SRP_AUTH` parameters: `USERNAME` (required), `SRP_A` (required), `SECRET_HASH`
30-
* (required if the app client is configured with a client secret), `DEVICE_KEY`.
31-
* - `SELECT_CHALLENGE`: Respond to the challenge with `USERNAME` and an `ANSWER` that matches one of the challenge
32-
* types in the `AvailableChallenges` response parameter.
33-
* - `SMS_MFA`: Respond with an `SMS_MFA_CODE` that your user pool delivered in an SMS message.
34-
* - `EMAIL_OTP`: Respond with an `EMAIL_OTP_CODE` that your user pool delivered in an email message.
35-
* - `PASSWORD_VERIFIER`: Respond with `PASSWORD_CLAIM_SIGNATURE`, `PASSWORD_CLAIM_SECRET_BLOCK`, and `TIMESTAMP` after
36-
* client-side SRP calculations.
26+
* authenticator, or passkey, as `CREDENTIAL`. Examples of WebAuthn authenticators include biometric devices and
27+
* security keys.
28+
* - `PASSWORD`: Respond with the user's password as `PASSWORD`.
29+
* - `PASSWORD_SRP`: Respond with the initial SRP secret as `SRP_A`.
30+
* - `SELECT_CHALLENGE`: Respond with a challenge selection as `ANSWER`. It must be one of the challenge types in the
31+
* `AvailableChallenges` response parameter. Add the parameters of the selected challenge, for example `USERNAME` and
32+
* `SMS_OTP`.
33+
* - `SMS_MFA`: Respond with the code that your user pool delivered in an SMS message, as `SMS_MFA_CODE`
34+
* - `EMAIL_MFA`: Respond with the code that your user pool delivered in an email message, as `EMAIL_MFA_CODE`
35+
* - `EMAIL_OTP`: Respond with the code that your user pool delivered in an email message, as `EMAIL_OTP_CODE` .
36+
* - `SMS_OTP`: Respond with the code that your user pool delivered in an SMS message, as `SMS_OTP_CODE`.
37+
* - `PASSWORD_VERIFIER`: Respond with the second stage of SRP secrets as `PASSWORD_CLAIM_SIGNATURE`,
38+
* `PASSWORD_CLAIM_SECRET_BLOCK`, and `TIMESTAMP`.
3739
* - `CUSTOM_CHALLENGE`: This is returned if your custom authentication flow determines that the user should pass
38-
* another challenge before tokens are issued. The parameters of the challenge are determined by your Lambda function.
40+
* another challenge before tokens are issued. The parameters of the challenge are determined by your Lambda function
41+
* and issued in the `ChallengeParameters` of a challenge response.
3942
* - `DEVICE_SRP_AUTH`: Respond with the initial parameters of device SRP authentication. For more information, see
4043
* Signing in with a device [^1].
4144
* - `DEVICE_PASSWORD_VERIFIER`: Respond with `PASSWORD_CLAIM_SIGNATURE`, `PASSWORD_CLAIM_SECRET_BLOCK`, and `TIMESTAMP`

0 commit comments

Comments
 (0)