aws-sdk-cognitoidentityprovider 1.117.0 → 1.119.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56478444c0af2150f985509932b8570f8913bcb6d9cc67d5993990cb5a5d7464
4
- data.tar.gz: 4a71b229862473a214a261d3a8effceb23532ba35b4d19b392f827260b66fea0
3
+ metadata.gz: 3d34ce7f8b54bbc48677f6a5e29d976517396e30cd4bf73fced415604e191720
4
+ data.tar.gz: ef168795dbfce26a4463d3e103335a6755ca982712c405fcff9680b65e8edd9e
5
5
  SHA512:
6
- metadata.gz: f08ecd9fc2ae9d3778ddc84dba8a453bfd0a5fd95414c5d1da23323903206f1ea752dd1b380550b4d3cfb5df4364fab8a2cf28a7715783024630abc0295d995e
7
- data.tar.gz: c8123eb204ac0b1fde1273777f9dea15609cc7d6ab6da4c919cf639bd190d4465d185b5be02cccd48e4b3e997614c3b2403a151d65064947efb0c940d0db04b6
6
+ metadata.gz: e95183eaaf26480336f926132badd48f89e285f31e4a1465d3baed196a23e65552c75a7fd4765ffd344b34a9e496806a401dc3cbe81c1bcdb7655d6e14e30cac
7
+ data.tar.gz: 3048a43ff691c2db8bc77862b7dc6195e6ab23e8b56d996481c5d2c9937f5b7506a1686bace56bc0e49ad279118971860264c841b5d1605b44744d2c47b11b8c
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.119.0 (2025-04-22)
5
+ ------------------
6
+
7
+ * Feature - This release adds refresh token rotation.
8
+
9
+ 1.118.0 (2025-03-14)
10
+ ------------------
11
+
12
+ * Feature - Minor description updates to API parameters
13
+
4
14
  1.117.0 (2025-03-03)
5
15
  ------------------
6
16
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.117.0
1
+ 1.119.0
@@ -845,16 +845,17 @@ module Aws::CognitoIdentityProvider
845
845
  # email
846
846
  #
847
847
  # : The email address where you want the user to receive their
848
- # confirmation code and username. You must provide a value for the
849
- # `email` when you want to set `email_verified` to `true`, or if you
850
- # set `EMAIL` in the `DesiredDeliveryMediums` parameter.
848
+ # confirmation code and username. You must provide a value for `email`
849
+ # when you want to set `email_verified` to `true`, or if you set
850
+ # `EMAIL` in the `DesiredDeliveryMediums` parameter.
851
851
  #
852
852
  # phone\_number
853
853
  #
854
854
  # : The phone number where you want the user to receive their
855
- # confirmation code and username. You must provide a value for the
856
- # `email` when you want to set `phone_number` to `true`, or if you set
857
- # `SMS` in the `DesiredDeliveryMediums` parameter.
855
+ # confirmation code and username. You must provide a value for
856
+ # `phone_number` when you want to set `phone_number_verified` to
857
+ # `true`, or if you set `SMS` in the `DesiredDeliveryMediums`
858
+ # parameter.
858
859
  #
859
860
  # @option params [Array<Types::AttributeType>] :validation_data
860
861
  # Temporary user attributes that contribute to the outcomes of your pre
@@ -2868,7 +2869,9 @@ module Aws::CognitoIdentityProvider
2868
2869
  # @option params [Types::SoftwareTokenMfaSettingsType] :software_token_mfa_settings
2869
2870
  # User preferences for time-based one-time password (TOTP) MFA.
2870
2871
  # Activates or deactivates TOTP MFA and sets it as the preferred MFA
2871
- # method when multiple methods are available.
2872
+ # method when multiple methods are available. This operation can set
2873
+ # TOTP as a user's preferred MFA method before they register a TOTP
2874
+ # authenticator.
2872
2875
  #
2873
2876
  # @option params [Types::EmailMfaSettingsType] :email_mfa_settings
2874
2877
  # User preferences for email message MFA. Activates or deactivates email
@@ -4712,7 +4715,8 @@ module Aws::CognitoIdentityProvider
4712
4715
  # you have deactivated device remembering in your user pool.
4713
4716
  #
4714
4717
  # <note markdown="1"> When you provide a value for any `DeviceConfiguration` field, you
4715
- # activate the Amazon Cognito device-remembering feature. For more infor
4718
+ # activate the Amazon Cognito device-remembering feature. For more
4719
+ # information, see [Working with devices][1].
4716
4720
  #
4717
4721
  # </note>
4718
4722
  #
@@ -5886,6 +5890,12 @@ module Aws::CognitoIdentityProvider
5886
5890
  # minutes, of that session token. Your user pool native user must
5887
5891
  # respond to each authentication challenge before the session expires.
5888
5892
  #
5893
+ # @option params [Types::RefreshTokenRotationType] :refresh_token_rotation
5894
+ # The configuration of your app client for refresh token rotation. When
5895
+ # enabled, your app client issues new ID, access, and refresh tokens
5896
+ # when users renew their sessions with refresh tokens. When disabled,
5897
+ # token refresh issues only ID and access tokens.
5898
+ #
5889
5899
  # @return [Types::CreateUserPoolClientResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
5890
5900
  #
5891
5901
  # * {Types::CreateUserPoolClientResponse#user_pool_client #user_pool_client} => Types::UserPoolClientType
@@ -6053,6 +6063,10 @@ module Aws::CognitoIdentityProvider
6053
6063
  # enable_token_revocation: false,
6054
6064
  # enable_propagate_additional_user_context_data: false,
6055
6065
  # auth_session_validity: 1,
6066
+ # refresh_token_rotation: {
6067
+ # feature: "ENABLED", # required, accepts ENABLED, DISABLED
6068
+ # retry_grace_period_seconds: 1,
6069
+ # },
6056
6070
  # })
6057
6071
  #
6058
6072
  # @example Response structure
@@ -6096,6 +6110,8 @@ module Aws::CognitoIdentityProvider
6096
6110
  # resp.user_pool_client.enable_token_revocation #=> Boolean
6097
6111
  # resp.user_pool_client.enable_propagate_additional_user_context_data #=> Boolean
6098
6112
  # resp.user_pool_client.auth_session_validity #=> Integer
6113
+ # resp.user_pool_client.refresh_token_rotation.feature #=> String, one of "ENABLED", "DISABLED"
6114
+ # resp.user_pool_client.refresh_token_rotation.retry_grace_period_seconds #=> Integer
6099
6115
  #
6100
6116
  # @see http://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/CreateUserPoolClient AWS API Documentation
6101
6117
  #
@@ -6168,9 +6184,7 @@ module Aws::CognitoIdentityProvider
6168
6184
  #
6169
6185
  # Provide this parameter only if you want to use a [custom domain][1]
6170
6186
  # for your user pool. Otherwise, you can omit this parameter and use a
6171
- # [prefix
6172
- # domain](cognito/latest/developerguide/cognito-user-pools-assign-domain-prefix.html)
6173
- # instead.
6187
+ # [prefix domain][2] instead.
6174
6188
  #
6175
6189
  # When you create a custom domain, the passkey RP ID defaults to the
6176
6190
  # custom domain. If you had a prefix domain active, this will cause
@@ -6181,6 +6195,7 @@ module Aws::CognitoIdentityProvider
6181
6195
  #
6182
6196
  #
6183
6197
  # [1]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-add-custom-domain.html
6198
+ # [2]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-assign-domain-prefix.html
6184
6199
  #
6185
6200
  # @return [Types::CreateUserPoolDomainResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
6186
6201
  #
@@ -6508,8 +6523,8 @@ module Aws::CognitoIdentityProvider
6508
6523
  # your Amazon Web Services account. Amazon Cognito retains deleted user
6509
6524
  # pools in an inactive state for 14 days, then begins a cleanup process
6510
6525
  # that fully removes them from Amazon Web Services systems. In case of
6511
- # accidental deletion, contact Amazon Web Services Support within 14
6512
- # days for restoration assistance.
6526
+ # accidental deletion, contact Amazon Web ServicesSupport within 14 days
6527
+ # for restoration assistance.
6513
6528
  #
6514
6529
  # Amazon Cognito begins full deletion of all resources from deleted user
6515
6530
  # pools after 14 days. In the case of large user pools, the cleanup
@@ -7179,6 +7194,8 @@ module Aws::CognitoIdentityProvider
7179
7194
  # resp.user_pool_client.enable_token_revocation #=> Boolean
7180
7195
  # resp.user_pool_client.enable_propagate_additional_user_context_data #=> Boolean
7181
7196
  # resp.user_pool_client.auth_session_validity #=> Integer
7197
+ # resp.user_pool_client.refresh_token_rotation.feature #=> String, one of "ENABLED", "DISABLED"
7198
+ # resp.user_pool_client.refresh_token_rotation.retry_grace_period_seconds #=> Integer
7182
7199
  #
7183
7200
  # @see http://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/DescribeUserPoolClient AWS API Documentation
7184
7201
  #
@@ -7798,6 +7815,109 @@ module Aws::CognitoIdentityProvider
7798
7815
  req.send_request(options)
7799
7816
  end
7800
7817
 
7818
+ # Given a refresh token, issues new ID, access, and optionally refresh
7819
+ # tokens for the user who owns the submitted token. This operation
7820
+ # issues a new refresh token and invalidates the original refresh token
7821
+ # after an optional grace period when refresh token rotation is enabled.
7822
+ # If refresh token rotation is disabled, issues new ID and access tokens
7823
+ # only.
7824
+ #
7825
+ # @option params [required, String] :refresh_token
7826
+ # A valid refresh token that can authorize the request for new tokens.
7827
+ # When refresh token rotation is active in the requested app client,
7828
+ # this token is invalidated after the request is complete.
7829
+ #
7830
+ # @option params [required, String] :client_id
7831
+ # The app client that issued the refresh token to the user who wants to
7832
+ # request new tokens.
7833
+ #
7834
+ # @option params [String] :client_secret
7835
+ # The client secret of the requested app client, if the client has a
7836
+ # secret.
7837
+ #
7838
+ # @option params [String] :device_key
7839
+ # When you enable device remembering, Amazon Cognito issues a device key
7840
+ # that you can use for device authentication that bypasses multi-factor
7841
+ # authentication (MFA). To implement `GetTokensFromRefreshToken` in a
7842
+ # user pool with device remembering, you must capture the device key
7843
+ # from the initial authentication request. If your application doesn't
7844
+ # provide the key of a registered device, Amazon Cognito issues a new
7845
+ # one. You must provide the confirmed device key in this request if
7846
+ # device remembering is enabled in your user pool.
7847
+ #
7848
+ # For more information about device remembering, see [Working with
7849
+ # devices][1].
7850
+ #
7851
+ #
7852
+ #
7853
+ # [1]: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-device-tracking.html
7854
+ #
7855
+ # @option params [Hash<String,String>] :client_metadata
7856
+ # A map of custom key-value pairs that you can provide as input for
7857
+ # certain custom workflows that this action triggers.
7858
+ #
7859
+ # You create custom workflows by assigning Lambda functions to user pool
7860
+ # triggers. When you use the `GetTokensFromRefreshToken` API action,
7861
+ # Amazon Cognito invokes the Lambda function the pre token generation
7862
+ # trigger.
7863
+ #
7864
+ # For more information, see [ Using Lambda triggers][1] in the *Amazon
7865
+ # Cognito Developer Guide*.
7866
+ #
7867
+ # <note markdown="1"> When you use the `ClientMetadata` parameter, note that Amazon Cognito
7868
+ # won't do the following:
7869
+ #
7870
+ # * Store the `ClientMetadata` value. This data is available only to
7871
+ # Lambda triggers that are assigned to a user pool to support custom
7872
+ # workflows. If your user pool configuration doesn't include
7873
+ # triggers, the `ClientMetadata` parameter serves no purpose.
7874
+ #
7875
+ # * Validate the `ClientMetadata` value.
7876
+ #
7877
+ # * Encrypt the `ClientMetadata` value. Don't send sensitive
7878
+ # information in this parameter.
7879
+ #
7880
+ # </note>
7881
+ #
7882
+ #
7883
+ #
7884
+ # [1]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html
7885
+ #
7886
+ # @return [Types::GetTokensFromRefreshTokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
7887
+ #
7888
+ # * {Types::GetTokensFromRefreshTokenResponse#authentication_result #authentication_result} => Types::AuthenticationResultType
7889
+ #
7890
+ # @example Request syntax with placeholder values
7891
+ #
7892
+ # resp = client.get_tokens_from_refresh_token({
7893
+ # refresh_token: "TokenModelType", # required
7894
+ # client_id: "ClientIdType", # required
7895
+ # client_secret: "ClientSecretType",
7896
+ # device_key: "DeviceKeyType",
7897
+ # client_metadata: {
7898
+ # "StringType" => "StringType",
7899
+ # },
7900
+ # })
7901
+ #
7902
+ # @example Response structure
7903
+ #
7904
+ # resp.authentication_result.access_token #=> String
7905
+ # resp.authentication_result.expires_in #=> Integer
7906
+ # resp.authentication_result.token_type #=> String
7907
+ # resp.authentication_result.refresh_token #=> String
7908
+ # resp.authentication_result.id_token #=> String
7909
+ # resp.authentication_result.new_device_metadata.device_key #=> String
7910
+ # resp.authentication_result.new_device_metadata.device_group_key #=> String
7911
+ #
7912
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/GetTokensFromRefreshToken AWS API Documentation
7913
+ #
7914
+ # @overload get_tokens_from_refresh_token(params = {})
7915
+ # @param [Hash] params ({})
7916
+ def get_tokens_from_refresh_token(params = {}, options = {})
7917
+ req = build_request(:get_tokens_from_refresh_token, params)
7918
+ req.send_request(options)
7919
+ end
7920
+
7801
7921
  # Given a user pool ID or app client, returns information about classic
7802
7922
  # hosted UI branding that you applied, if any. Returns user-pool level
7803
7923
  # branding information if no app client branding is applied, or if you
@@ -10096,8 +10216,11 @@ module Aws::CognitoIdentityProvider
10096
10216
  # Sets up or modifies the logging configuration of a user pool. User
10097
10217
  # pools can export user notification logs and, when threat protection is
10098
10218
  # active, user-activity logs. For more information, see [Exporting user
10099
- # pool
10100
- # logs](cognito/latest/developerguide/exporting-quotas-and-usage.html).
10219
+ # pool logs][1].
10220
+ #
10221
+ #
10222
+ #
10223
+ # [1]: https://docs.aws.amazon.com/cognito/latest/developerguide/exporting-quotas-and-usage.html
10101
10224
  #
10102
10225
  # @option params [required, String] :user_pool_id
10103
10226
  # The ID of the user pool where you want to configure logging.
@@ -10417,7 +10540,8 @@ module Aws::CognitoIdentityProvider
10417
10540
  # @option params [Types::SoftwareTokenMfaSettingsType] :software_token_mfa_settings
10418
10541
  # User preferences for time-based one-time password (TOTP) MFA.
10419
10542
  # Activates or deactivates TOTP MFA and sets it as the preferred MFA
10420
- # method when multiple methods are available.
10543
+ # method when multiple methods are available. Users must register a TOTP
10544
+ # authenticator before they set this as their preferred MFA method.
10421
10545
  #
10422
10546
  # @option params [Types::EmailMfaSettingsType] :email_mfa_settings
10423
10547
  # User preferences for email message MFA. Activates or deactivates email
@@ -11983,7 +12107,8 @@ module Aws::CognitoIdentityProvider
11983
12107
  # you have deactivated device remembering in your user pool.
11984
12108
  #
11985
12109
  # <note markdown="1"> When you provide a value for any `DeviceConfiguration` field, you
11986
- # activate the Amazon Cognito device-remembering feature. For more infor
12110
+ # activate the Amazon Cognito device-remembering feature. For more
12111
+ # information, see [Working with devices][1].
11987
12112
  #
11988
12113
  # </note>
11989
12114
  #
@@ -12547,6 +12672,12 @@ module Aws::CognitoIdentityProvider
12547
12672
  # minutes, of that session token. Your user pool native user must
12548
12673
  # respond to each authentication challenge before the session expires.
12549
12674
  #
12675
+ # @option params [Types::RefreshTokenRotationType] :refresh_token_rotation
12676
+ # The configuration of your app client for refresh token rotation. When
12677
+ # enabled, your app client issues new ID, access, and refresh tokens
12678
+ # when users renew their sessions with refresh tokens. When disabled,
12679
+ # token refresh issues only ID and access tokens.
12680
+ #
12550
12681
  # @return [Types::UpdateUserPoolClientResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
12551
12682
  #
12552
12683
  # * {Types::UpdateUserPoolClientResponse#user_pool_client #user_pool_client} => Types::UserPoolClientType
@@ -12586,6 +12717,10 @@ module Aws::CognitoIdentityProvider
12586
12717
  # enable_token_revocation: false,
12587
12718
  # enable_propagate_additional_user_context_data: false,
12588
12719
  # auth_session_validity: 1,
12720
+ # refresh_token_rotation: {
12721
+ # feature: "ENABLED", # required, accepts ENABLED, DISABLED
12722
+ # retry_grace_period_seconds: 1,
12723
+ # },
12589
12724
  # })
12590
12725
  #
12591
12726
  # @example Response structure
@@ -12629,6 +12764,8 @@ module Aws::CognitoIdentityProvider
12629
12764
  # resp.user_pool_client.enable_token_revocation #=> Boolean
12630
12765
  # resp.user_pool_client.enable_propagate_additional_user_context_data #=> Boolean
12631
12766
  # resp.user_pool_client.auth_session_validity #=> Integer
12767
+ # resp.user_pool_client.refresh_token_rotation.feature #=> String, one of "ENABLED", "DISABLED"
12768
+ # resp.user_pool_client.refresh_token_rotation.retry_grace_period_seconds #=> Integer
12632
12769
  #
12633
12770
  # @see http://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/UpdateUserPoolClient AWS API Documentation
12634
12771
  #
@@ -12882,7 +13019,7 @@ module Aws::CognitoIdentityProvider
12882
13019
  tracer: tracer
12883
13020
  )
12884
13021
  context[:gem_name] = 'aws-sdk-cognitoidentityprovider'
12885
- context[:gem_version] = '1.117.0'
13022
+ context[:gem_version] = '1.119.0'
12886
13023
  Seahorse::Client::Request.new(handlers, context)
12887
13024
  end
12888
13025
 
@@ -251,6 +251,7 @@ module Aws::CognitoIdentityProvider
251
251
  ExpiredCodeException = Shapes::StructureShape.new(name: 'ExpiredCodeException')
252
252
  ExplicitAuthFlowsListType = Shapes::ListShape.new(name: 'ExplicitAuthFlowsListType')
253
253
  ExplicitAuthFlowsType = Shapes::StringShape.new(name: 'ExplicitAuthFlowsType')
254
+ FeatureType = Shapes::StringShape.new(name: 'FeatureType')
254
255
  FeatureUnavailableInTierException = Shapes::StructureShape.new(name: 'FeatureUnavailableInTierException')
255
256
  FeedbackValueType = Shapes::StringShape.new(name: 'FeedbackValueType')
256
257
  FirehoseConfigurationType = Shapes::StructureShape.new(name: 'FirehoseConfigurationType')
@@ -272,6 +273,8 @@ module Aws::CognitoIdentityProvider
272
273
  GetLogDeliveryConfigurationResponse = Shapes::StructureShape.new(name: 'GetLogDeliveryConfigurationResponse')
273
274
  GetSigningCertificateRequest = Shapes::StructureShape.new(name: 'GetSigningCertificateRequest')
274
275
  GetSigningCertificateResponse = Shapes::StructureShape.new(name: 'GetSigningCertificateResponse')
276
+ GetTokensFromRefreshTokenRequest = Shapes::StructureShape.new(name: 'GetTokensFromRefreshTokenRequest')
277
+ GetTokensFromRefreshTokenResponse = Shapes::StructureShape.new(name: 'GetTokensFromRefreshTokenResponse')
275
278
  GetUICustomizationRequest = Shapes::StructureShape.new(name: 'GetUICustomizationRequest')
276
279
  GetUICustomizationResponse = Shapes::StructureShape.new(name: 'GetUICustomizationResponse')
277
280
  GetUserAttributeVerificationCodeRequest = Shapes::StructureShape.new(name: 'GetUserAttributeVerificationCodeRequest')
@@ -388,6 +391,8 @@ module Aws::CognitoIdentityProvider
388
391
  RecoveryOptionNameType = Shapes::StringShape.new(name: 'RecoveryOptionNameType')
389
392
  RecoveryOptionType = Shapes::StructureShape.new(name: 'RecoveryOptionType')
390
393
  RedirectUrlType = Shapes::StringShape.new(name: 'RedirectUrlType')
394
+ RefreshTokenReuseException = Shapes::StructureShape.new(name: 'RefreshTokenReuseException')
395
+ RefreshTokenRotationType = Shapes::StructureShape.new(name: 'RefreshTokenRotationType')
391
396
  RefreshTokenValidityType = Shapes::IntegerShape.new(name: 'RefreshTokenValidityType')
392
397
  RegionCodeType = Shapes::StringShape.new(name: 'RegionCodeType')
393
398
  RelyingPartyIdType = Shapes::StringShape.new(name: 'RelyingPartyIdType')
@@ -405,6 +410,7 @@ module Aws::CognitoIdentityProvider
405
410
  ResourceServersListType = Shapes::ListShape.new(name: 'ResourceServersListType')
406
411
  RespondToAuthChallengeRequest = Shapes::StructureShape.new(name: 'RespondToAuthChallengeRequest')
407
412
  RespondToAuthChallengeResponse = Shapes::StructureShape.new(name: 'RespondToAuthChallengeResponse')
413
+ RetryGracePeriodSecondsType = Shapes::IntegerShape.new(name: 'RetryGracePeriodSecondsType')
408
414
  RevokeTokenRequest = Shapes::StructureShape.new(name: 'RevokeTokenRequest')
409
415
  RevokeTokenResponse = Shapes::StructureShape.new(name: 'RevokeTokenResponse')
410
416
  RiskConfigurationType = Shapes::StructureShape.new(name: 'RiskConfigurationType')
@@ -1058,6 +1064,7 @@ module Aws::CognitoIdentityProvider
1058
1064
  CreateUserPoolClientRequest.add_member(:enable_token_revocation, Shapes::ShapeRef.new(shape: WrappedBooleanType, location_name: "EnableTokenRevocation"))
1059
1065
  CreateUserPoolClientRequest.add_member(:enable_propagate_additional_user_context_data, Shapes::ShapeRef.new(shape: WrappedBooleanType, location_name: "EnablePropagateAdditionalUserContextData"))
1060
1066
  CreateUserPoolClientRequest.add_member(:auth_session_validity, Shapes::ShapeRef.new(shape: AuthSessionValidityType, location_name: "AuthSessionValidity"))
1067
+ CreateUserPoolClientRequest.add_member(:refresh_token_rotation, Shapes::ShapeRef.new(shape: RefreshTokenRotationType, location_name: "RefreshTokenRotation"))
1061
1068
  CreateUserPoolClientRequest.struct_class = Types::CreateUserPoolClientRequest
1062
1069
 
1063
1070
  CreateUserPoolClientResponse.add_member(:user_pool_client, Shapes::ShapeRef.new(shape: UserPoolClientType, location_name: "UserPoolClient"))
@@ -1364,6 +1371,16 @@ module Aws::CognitoIdentityProvider
1364
1371
  GetSigningCertificateResponse.add_member(:certificate, Shapes::ShapeRef.new(shape: StringType, location_name: "Certificate"))
1365
1372
  GetSigningCertificateResponse.struct_class = Types::GetSigningCertificateResponse
1366
1373
 
1374
+ GetTokensFromRefreshTokenRequest.add_member(:refresh_token, Shapes::ShapeRef.new(shape: TokenModelType, required: true, location_name: "RefreshToken"))
1375
+ GetTokensFromRefreshTokenRequest.add_member(:client_id, Shapes::ShapeRef.new(shape: ClientIdType, required: true, location_name: "ClientId"))
1376
+ GetTokensFromRefreshTokenRequest.add_member(:client_secret, Shapes::ShapeRef.new(shape: ClientSecretType, location_name: "ClientSecret"))
1377
+ GetTokensFromRefreshTokenRequest.add_member(:device_key, Shapes::ShapeRef.new(shape: DeviceKeyType, location_name: "DeviceKey"))
1378
+ GetTokensFromRefreshTokenRequest.add_member(:client_metadata, Shapes::ShapeRef.new(shape: ClientMetadataType, location_name: "ClientMetadata"))
1379
+ GetTokensFromRefreshTokenRequest.struct_class = Types::GetTokensFromRefreshTokenRequest
1380
+
1381
+ GetTokensFromRefreshTokenResponse.add_member(:authentication_result, Shapes::ShapeRef.new(shape: AuthenticationResultType, location_name: "AuthenticationResult"))
1382
+ GetTokensFromRefreshTokenResponse.struct_class = Types::GetTokensFromRefreshTokenResponse
1383
+
1367
1384
  GetUICustomizationRequest.add_member(:user_pool_id, Shapes::ShapeRef.new(shape: UserPoolIdType, required: true, location_name: "UserPoolId"))
1368
1385
  GetUICustomizationRequest.add_member(:client_id, Shapes::ShapeRef.new(shape: ClientIdType, location_name: "ClientId"))
1369
1386
  GetUICustomizationRequest.struct_class = Types::GetUICustomizationRequest
@@ -1719,6 +1736,13 @@ module Aws::CognitoIdentityProvider
1719
1736
  RecoveryOptionType.add_member(:name, Shapes::ShapeRef.new(shape: RecoveryOptionNameType, required: true, location_name: "Name"))
1720
1737
  RecoveryOptionType.struct_class = Types::RecoveryOptionType
1721
1738
 
1739
+ RefreshTokenReuseException.add_member(:message, Shapes::ShapeRef.new(shape: MessageType, location_name: "message"))
1740
+ RefreshTokenReuseException.struct_class = Types::RefreshTokenReuseException
1741
+
1742
+ RefreshTokenRotationType.add_member(:feature, Shapes::ShapeRef.new(shape: FeatureType, required: true, location_name: "Feature"))
1743
+ RefreshTokenRotationType.add_member(:retry_grace_period_seconds, Shapes::ShapeRef.new(shape: RetryGracePeriodSecondsType, location_name: "RetryGracePeriodSeconds"))
1744
+ RefreshTokenRotationType.struct_class = Types::RefreshTokenRotationType
1745
+
1722
1746
  ResendConfirmationCodeRequest.add_member(:client_id, Shapes::ShapeRef.new(shape: ClientIdType, required: true, location_name: "ClientId"))
1723
1747
  ResendConfirmationCodeRequest.add_member(:secret_hash, Shapes::ShapeRef.new(shape: SecretHashType, location_name: "SecretHash"))
1724
1748
  ResendConfirmationCodeRequest.add_member(:user_context_data, Shapes::ShapeRef.new(shape: UserContextDataType, location_name: "UserContextData"))
@@ -2066,6 +2090,7 @@ module Aws::CognitoIdentityProvider
2066
2090
  UpdateUserPoolClientRequest.add_member(:enable_token_revocation, Shapes::ShapeRef.new(shape: WrappedBooleanType, location_name: "EnableTokenRevocation"))
2067
2091
  UpdateUserPoolClientRequest.add_member(:enable_propagate_additional_user_context_data, Shapes::ShapeRef.new(shape: WrappedBooleanType, location_name: "EnablePropagateAdditionalUserContextData"))
2068
2092
  UpdateUserPoolClientRequest.add_member(:auth_session_validity, Shapes::ShapeRef.new(shape: AuthSessionValidityType, location_name: "AuthSessionValidity"))
2093
+ UpdateUserPoolClientRequest.add_member(:refresh_token_rotation, Shapes::ShapeRef.new(shape: RefreshTokenRotationType, location_name: "RefreshTokenRotation"))
2069
2094
  UpdateUserPoolClientRequest.struct_class = Types::UpdateUserPoolClientRequest
2070
2095
 
2071
2096
  UpdateUserPoolClientResponse.add_member(:user_pool_client, Shapes::ShapeRef.new(shape: UserPoolClientType, location_name: "UserPoolClient"))
@@ -2183,6 +2208,7 @@ module Aws::CognitoIdentityProvider
2183
2208
  UserPoolClientType.add_member(:enable_token_revocation, Shapes::ShapeRef.new(shape: WrappedBooleanType, location_name: "EnableTokenRevocation"))
2184
2209
  UserPoolClientType.add_member(:enable_propagate_additional_user_context_data, Shapes::ShapeRef.new(shape: WrappedBooleanType, location_name: "EnablePropagateAdditionalUserContextData"))
2185
2210
  UserPoolClientType.add_member(:auth_session_validity, Shapes::ShapeRef.new(shape: AuthSessionValidityType, location_name: "AuthSessionValidity"))
2211
+ UserPoolClientType.add_member(:refresh_token_rotation, Shapes::ShapeRef.new(shape: RefreshTokenRotationType, location_name: "RefreshTokenRotation"))
2186
2212
  UserPoolClientType.struct_class = Types::UserPoolClientType
2187
2213
 
2188
2214
  UserPoolDescriptionType.add_member(:id, Shapes::ShapeRef.new(shape: UserPoolIdType, location_name: "Id"))
@@ -2538,6 +2564,7 @@ module Aws::CognitoIdentityProvider
2538
2564
  o.input = Shapes::ShapeRef.new(shape: AdminInitiateAuthRequest)
2539
2565
  o.output = Shapes::ShapeRef.new(shape: AdminInitiateAuthResponse)
2540
2566
  o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
2567
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedOperationException)
2541
2568
  o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
2542
2569
  o.errors << Shapes::ShapeRef.new(shape: NotAuthorizedException)
2543
2570
  o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
@@ -3045,6 +3072,7 @@ module Aws::CognitoIdentityProvider
3045
3072
  o.errors << Shapes::ShapeRef.new(shape: ScopeDoesNotExistException)
3046
3073
  o.errors << Shapes::ShapeRef.new(shape: InvalidOAuthFlowException)
3047
3074
  o.errors << Shapes::ShapeRef.new(shape: InternalErrorException)
3075
+ o.errors << Shapes::ShapeRef.new(shape: FeatureUnavailableInTierException)
3048
3076
  end)
3049
3077
 
3050
3078
  api.add_operation(:create_user_pool_domain, Seahorse::Model::Operation.new.tap do |o|
@@ -3055,6 +3083,7 @@ module Aws::CognitoIdentityProvider
3055
3083
  o.output = Shapes::ShapeRef.new(shape: CreateUserPoolDomainResponse)
3056
3084
  o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
3057
3085
  o.errors << Shapes::ShapeRef.new(shape: NotAuthorizedException)
3086
+ o.errors << Shapes::ShapeRef.new(shape: ConcurrentModificationException)
3058
3087
  o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
3059
3088
  o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
3060
3089
  o.errors << Shapes::ShapeRef.new(shape: InternalErrorException)
@@ -3190,6 +3219,7 @@ module Aws::CognitoIdentityProvider
3190
3219
  o.output = Shapes::ShapeRef.new(shape: DeleteUserPoolDomainResponse)
3191
3220
  o.errors << Shapes::ShapeRef.new(shape: NotAuthorizedException)
3192
3221
  o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
3222
+ o.errors << Shapes::ShapeRef.new(shape: ConcurrentModificationException)
3193
3223
  o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
3194
3224
  o.errors << Shapes::ShapeRef.new(shape: InternalErrorException)
3195
3225
  end)
@@ -3455,6 +3485,25 @@ module Aws::CognitoIdentityProvider
3455
3485
  o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
3456
3486
  end)
3457
3487
 
3488
+ api.add_operation(:get_tokens_from_refresh_token, Seahorse::Model::Operation.new.tap do |o|
3489
+ o.name = "GetTokensFromRefreshToken"
3490
+ o.http_method = "POST"
3491
+ o.http_request_uri = "/"
3492
+ o.input = Shapes::ShapeRef.new(shape: GetTokensFromRefreshTokenRequest)
3493
+ o.output = Shapes::ShapeRef.new(shape: GetTokensFromRefreshTokenResponse)
3494
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
3495
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
3496
+ o.errors << Shapes::ShapeRef.new(shape: NotAuthorizedException)
3497
+ o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
3498
+ o.errors << Shapes::ShapeRef.new(shape: UserNotFoundException)
3499
+ o.errors << Shapes::ShapeRef.new(shape: UnexpectedLambdaException)
3500
+ o.errors << Shapes::ShapeRef.new(shape: UserLambdaValidationException)
3501
+ o.errors << Shapes::ShapeRef.new(shape: InvalidLambdaResponseException)
3502
+ o.errors << Shapes::ShapeRef.new(shape: ForbiddenException)
3503
+ o.errors << Shapes::ShapeRef.new(shape: RefreshTokenReuseException)
3504
+ o.errors << Shapes::ShapeRef.new(shape: InternalErrorException)
3505
+ end)
3506
+
3458
3507
  api.add_operation(:get_ui_customization, Seahorse::Model::Operation.new.tap do |o|
3459
3508
  o.name = "GetUICustomization"
3460
3509
  o.http_method = "POST"
@@ -3572,6 +3621,7 @@ module Aws::CognitoIdentityProvider
3572
3621
  o['auth'] = ["smithy.api#noAuth"]
3573
3622
  o.input = Shapes::ShapeRef.new(shape: InitiateAuthRequest)
3574
3623
  o.output = Shapes::ShapeRef.new(shape: InitiateAuthResponse)
3624
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedOperationException)
3575
3625
  o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
3576
3626
  o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
3577
3627
  o.errors << Shapes::ShapeRef.new(shape: NotAuthorizedException)
@@ -4207,6 +4257,7 @@ module Aws::CognitoIdentityProvider
4207
4257
  o.errors << Shapes::ShapeRef.new(shape: ScopeDoesNotExistException)
4208
4258
  o.errors << Shapes::ShapeRef.new(shape: InvalidOAuthFlowException)
4209
4259
  o.errors << Shapes::ShapeRef.new(shape: InternalErrorException)
4260
+ o.errors << Shapes::ShapeRef.new(shape: FeatureUnavailableInTierException)
4210
4261
  end)
4211
4262
 
4212
4263
  api.add_operation(:update_user_pool_domain, Seahorse::Model::Operation.new.tap do |o|
@@ -4217,6 +4268,7 @@ module Aws::CognitoIdentityProvider
4217
4268
  o.output = Shapes::ShapeRef.new(shape: UpdateUserPoolDomainResponse)
4218
4269
  o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
4219
4270
  o.errors << Shapes::ShapeRef.new(shape: NotAuthorizedException)
4271
+ o.errors << Shapes::ShapeRef.new(shape: ConcurrentModificationException)
4220
4272
  o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
4221
4273
  o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
4222
4274
  o.errors << Shapes::ShapeRef.new(shape: InternalErrorException)
@@ -54,6 +54,7 @@ module Aws::CognitoIdentityProvider
54
54
  # * {PasswordHistoryPolicyViolationException}
55
55
  # * {PasswordResetRequiredException}
56
56
  # * {PreconditionNotMetException}
57
+ # * {RefreshTokenReuseException}
57
58
  # * {ResourceNotFoundException}
58
59
  # * {ScopeDoesNotExistException}
59
60
  # * {SoftwareTokenMFANotFoundException}
@@ -497,6 +498,21 @@ module Aws::CognitoIdentityProvider
497
498
  end
498
499
  end
499
500
 
501
+ class RefreshTokenReuseException < ServiceError
502
+
503
+ # @param [Seahorse::Client::RequestContext] context
504
+ # @param [String] message
505
+ # @param [Aws::CognitoIdentityProvider::Types::RefreshTokenReuseException] data
506
+ def initialize(context, message, data = Aws::EmptyStructure.new)
507
+ super(context, message, data)
508
+ end
509
+
510
+ # @return [String]
511
+ def message
512
+ @message || @data[:message]
513
+ end
514
+ end
515
+
500
516
  class ResourceNotFoundException < ServiceError
501
517
 
502
518
  # @param [Seahorse::Client::RequestContext] context
@@ -385,16 +385,17 @@ module Aws::CognitoIdentityProvider
385
385
  # email
386
386
  #
387
387
  # : The email address where you want the user to receive their
388
- # confirmation code and username. You must provide a value for the
388
+ # confirmation code and username. You must provide a value for
389
389
  # `email` when you want to set `email_verified` to `true`, or if you
390
390
  # set `EMAIL` in the `DesiredDeliveryMediums` parameter.
391
391
  #
392
392
  # phone\_number
393
393
  #
394
394
  # : The phone number where you want the user to receive their
395
- # confirmation code and username. You must provide a value for the
396
- # `email` when you want to set `phone_number` to `true`, or if you
397
- # set `SMS` in the `DesiredDeliveryMediums` parameter.
395
+ # confirmation code and username. You must provide a value for
396
+ # `phone_number` when you want to set `phone_number_verified` to
397
+ # `true`, or if you set `SMS` in the `DesiredDeliveryMediums`
398
+ # parameter.
398
399
  # @return [Array<Types::AttributeType>]
399
400
  #
400
401
  # @!attribute [rw] validation_data
@@ -2073,7 +2074,9 @@ module Aws::CognitoIdentityProvider
2073
2074
  # @!attribute [rw] software_token_mfa_settings
2074
2075
  # User preferences for time-based one-time password (TOTP) MFA.
2075
2076
  # Activates or deactivates TOTP MFA and sets it as the preferred MFA
2076
- # method when multiple methods are available.
2077
+ # method when multiple methods are available. This operation can set
2078
+ # TOTP as a user's preferred MFA method before they register a TOTP
2079
+ # authenticator.
2077
2080
  # @return [Types::SoftwareTokenMfaSettingsType]
2078
2081
  #
2079
2082
  # @!attribute [rw] email_mfa_settings
@@ -4248,6 +4251,13 @@ module Aws::CognitoIdentityProvider
4248
4251
  # respond to each authentication challenge before the session expires.
4249
4252
  # @return [Integer]
4250
4253
  #
4254
+ # @!attribute [rw] refresh_token_rotation
4255
+ # The configuration of your app client for refresh token rotation.
4256
+ # When enabled, your app client issues new ID, access, and refresh
4257
+ # tokens when users renew their sessions with refresh tokens. When
4258
+ # disabled, token refresh issues only ID and access tokens.
4259
+ # @return [Types::RefreshTokenRotationType]
4260
+ #
4251
4261
  # @see http://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/CreateUserPoolClientRequest AWS API Documentation
4252
4262
  #
4253
4263
  class CreateUserPoolClientRequest < Struct.new(
@@ -4272,7 +4282,8 @@ module Aws::CognitoIdentityProvider
4272
4282
  :prevent_user_existence_errors,
4273
4283
  :enable_token_revocation,
4274
4284
  :enable_propagate_additional_user_context_data,
4275
- :auth_session_validity)
4285
+ :auth_session_validity,
4286
+ :refresh_token_rotation)
4276
4287
  SENSITIVE = []
4277
4288
  include Aws::Structure
4278
4289
  end
@@ -4322,9 +4333,7 @@ module Aws::CognitoIdentityProvider
4322
4333
  #
4323
4334
  # Provide this parameter only if you want to use a [custom domain][1]
4324
4335
  # for your user pool. Otherwise, you can omit this parameter and use a
4325
- # [prefix
4326
- # domain](cognito/latest/developerguide/cognito-user-pools-assign-domain-prefix.html)
4327
- # instead.
4336
+ # [prefix domain][2] instead.
4328
4337
  #
4329
4338
  # When you create a custom domain, the passkey RP ID defaults to the
4330
4339
  # custom domain. If you had a prefix domain active, this will cause
@@ -4335,6 +4344,7 @@ module Aws::CognitoIdentityProvider
4335
4344
  #
4336
4345
  #
4337
4346
  # [1]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-add-custom-domain.html
4347
+ # [2]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-assign-domain-prefix.html
4338
4348
  # @return [Types::CustomDomainConfigType]
4339
4349
  #
4340
4350
  # @see http://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/CreateUserPoolDomainRequest AWS API Documentation
@@ -4507,7 +4517,7 @@ module Aws::CognitoIdentityProvider
4507
4517
  #
4508
4518
  # <note markdown="1"> When you provide a value for any `DeviceConfiguration` field, you
4509
4519
  # activate the Amazon Cognito device-remembering feature. For more
4510
- # infor
4520
+ # information, see [Working with devices][1].
4511
4521
  #
4512
4522
  # </note>
4513
4523
  #
@@ -6156,6 +6166,98 @@ module Aws::CognitoIdentityProvider
6156
6166
  include Aws::Structure
6157
6167
  end
6158
6168
 
6169
+ # @!attribute [rw] refresh_token
6170
+ # A valid refresh token that can authorize the request for new tokens.
6171
+ # When refresh token rotation is active in the requested app client,
6172
+ # this token is invalidated after the request is complete.
6173
+ # @return [String]
6174
+ #
6175
+ # @!attribute [rw] client_id
6176
+ # The app client that issued the refresh token to the user who wants
6177
+ # to request new tokens.
6178
+ # @return [String]
6179
+ #
6180
+ # @!attribute [rw] client_secret
6181
+ # The client secret of the requested app client, if the client has a
6182
+ # secret.
6183
+ # @return [String]
6184
+ #
6185
+ # @!attribute [rw] device_key
6186
+ # When you enable device remembering, Amazon Cognito issues a device
6187
+ # key that you can use for device authentication that bypasses
6188
+ # multi-factor authentication (MFA). To implement
6189
+ # `GetTokensFromRefreshToken` in a user pool with device remembering,
6190
+ # you must capture the device key from the initial authentication
6191
+ # request. If your application doesn't provide the key of a
6192
+ # registered device, Amazon Cognito issues a new one. You must provide
6193
+ # the confirmed device key in this request if device remembering is
6194
+ # enabled in your user pool.
6195
+ #
6196
+ # For more information about device remembering, see [Working with
6197
+ # devices][1].
6198
+ #
6199
+ #
6200
+ #
6201
+ # [1]: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-device-tracking.html
6202
+ # @return [String]
6203
+ #
6204
+ # @!attribute [rw] client_metadata
6205
+ # A map of custom key-value pairs that you can provide as input for
6206
+ # certain custom workflows that this action triggers.
6207
+ #
6208
+ # You create custom workflows by assigning Lambda functions to user
6209
+ # pool triggers. When you use the `GetTokensFromRefreshToken` API
6210
+ # action, Amazon Cognito invokes the Lambda function the pre token
6211
+ # generation trigger.
6212
+ #
6213
+ # For more information, see [ Using Lambda triggers][1] in the *Amazon
6214
+ # Cognito Developer Guide*.
6215
+ #
6216
+ # <note markdown="1"> When you use the `ClientMetadata` parameter, note that Amazon
6217
+ # Cognito won't do the following:
6218
+ #
6219
+ # * Store the `ClientMetadata` value. This data is available only to
6220
+ # Lambda triggers that are assigned to a user pool to support custom
6221
+ # workflows. If your user pool configuration doesn't include
6222
+ # triggers, the `ClientMetadata` parameter serves no purpose.
6223
+ #
6224
+ # * Validate the `ClientMetadata` value.
6225
+ #
6226
+ # * Encrypt the `ClientMetadata` value. Don't send sensitive
6227
+ # information in this parameter.
6228
+ #
6229
+ # </note>
6230
+ #
6231
+ #
6232
+ #
6233
+ # [1]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html
6234
+ # @return [Hash<String,String>]
6235
+ #
6236
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/GetTokensFromRefreshTokenRequest AWS API Documentation
6237
+ #
6238
+ class GetTokensFromRefreshTokenRequest < Struct.new(
6239
+ :refresh_token,
6240
+ :client_id,
6241
+ :client_secret,
6242
+ :device_key,
6243
+ :client_metadata)
6244
+ SENSITIVE = [:refresh_token, :client_id, :client_secret]
6245
+ include Aws::Structure
6246
+ end
6247
+
6248
+ # @!attribute [rw] authentication_result
6249
+ # The object that your application receives after authentication.
6250
+ # Contains tokens and information for device authentication.
6251
+ # @return [Types::AuthenticationResultType]
6252
+ #
6253
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/GetTokensFromRefreshTokenResponse AWS API Documentation
6254
+ #
6255
+ class GetTokensFromRefreshTokenResponse < Struct.new(
6256
+ :authentication_result)
6257
+ SENSITIVE = []
6258
+ include Aws::Structure
6259
+ end
6260
+
6159
6261
  # @!attribute [rw] user_pool_id
6160
6262
  # The ID of the user pool that you want to query for branding
6161
6263
  # settings.
@@ -8691,6 +8793,48 @@ module Aws::CognitoIdentityProvider
8691
8793
  include Aws::Structure
8692
8794
  end
8693
8795
 
8796
+ # This exception is throw when your application requests token refresh
8797
+ # with a refresh token that has been invalidated by refresh-token
8798
+ # rotation.
8799
+ #
8800
+ # @!attribute [rw] message
8801
+ # @return [String]
8802
+ #
8803
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/RefreshTokenReuseException AWS API Documentation
8804
+ #
8805
+ class RefreshTokenReuseException < Struct.new(
8806
+ :message)
8807
+ SENSITIVE = []
8808
+ include Aws::Structure
8809
+ end
8810
+
8811
+ # The configuration of your app client for refresh token rotation. When
8812
+ # enabled, your app client issues new ID, access, and refresh tokens
8813
+ # when users renew their sessions with refresh tokens. When disabled,
8814
+ # token refresh issues only ID and access tokens.
8815
+ #
8816
+ # @!attribute [rw] feature
8817
+ # The state of refresh token rotation for the current app client.
8818
+ # @return [String]
8819
+ #
8820
+ # @!attribute [rw] retry_grace_period_seconds
8821
+ # When you request a token refresh with `GetTokensFromRefreshToken`,
8822
+ # the original refresh token that you're rotating out can remain
8823
+ # valid for a period of time of up to 60 seconds. This allows for
8824
+ # client-side retries. When `RetryGracePeriodSeconds` is `0`, the
8825
+ # grace period is disabled and a successful request immediately
8826
+ # invalidates the submitted refresh token.
8827
+ # @return [Integer]
8828
+ #
8829
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/RefreshTokenRotationType AWS API Documentation
8830
+ #
8831
+ class RefreshTokenRotationType < Struct.new(
8832
+ :feature,
8833
+ :retry_grace_period_seconds)
8834
+ SENSITIVE = []
8835
+ include Aws::Structure
8836
+ end
8837
+
8694
8838
  # Represents the request to resend the confirmation code.
8695
8839
  #
8696
8840
  # @!attribute [rw] client_id
@@ -9754,7 +9898,9 @@ module Aws::CognitoIdentityProvider
9754
9898
  # @!attribute [rw] software_token_mfa_settings
9755
9899
  # User preferences for time-based one-time password (TOTP) MFA.
9756
9900
  # Activates or deactivates TOTP MFA and sets it as the preferred MFA
9757
- # method when multiple methods are available.
9901
+ # method when multiple methods are available. Users must register a
9902
+ # TOTP authenticator before they set this as their preferred MFA
9903
+ # method.
9758
9904
  # @return [Types::SoftwareTokenMfaSettingsType]
9759
9905
  #
9760
9906
  # @!attribute [rw] email_mfa_settings
@@ -11566,6 +11712,13 @@ module Aws::CognitoIdentityProvider
11566
11712
  # respond to each authentication challenge before the session expires.
11567
11713
  # @return [Integer]
11568
11714
  #
11715
+ # @!attribute [rw] refresh_token_rotation
11716
+ # The configuration of your app client for refresh token rotation.
11717
+ # When enabled, your app client issues new ID, access, and refresh
11718
+ # tokens when users renew their sessions with refresh tokens. When
11719
+ # disabled, token refresh issues only ID and access tokens.
11720
+ # @return [Types::RefreshTokenRotationType]
11721
+ #
11569
11722
  # @see http://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/UpdateUserPoolClientRequest AWS API Documentation
11570
11723
  #
11571
11724
  class UpdateUserPoolClientRequest < Struct.new(
@@ -11590,7 +11743,8 @@ module Aws::CognitoIdentityProvider
11590
11743
  :prevent_user_existence_errors,
11591
11744
  :enable_token_revocation,
11592
11745
  :enable_propagate_additional_user_context_data,
11593
- :auth_session_validity)
11746
+ :auth_session_validity,
11747
+ :refresh_token_rotation)
11594
11748
  SENSITIVE = [:client_id]
11595
11749
  include Aws::Structure
11596
11750
  end
@@ -11805,7 +11959,7 @@ module Aws::CognitoIdentityProvider
11805
11959
  #
11806
11960
  # <note markdown="1"> When you provide a value for any `DeviceConfiguration` field, you
11807
11961
  # activate the Amazon Cognito device-remembering feature. For more
11808
- # infor
11962
+ # information, see [Working with devices][1].
11809
11963
  #
11810
11964
  # </note>
11811
11965
  #
@@ -12614,6 +12768,13 @@ module Aws::CognitoIdentityProvider
12614
12768
  # respond to each authentication challenge before the session expires.
12615
12769
  # @return [Integer]
12616
12770
  #
12771
+ # @!attribute [rw] refresh_token_rotation
12772
+ # The configuration of your app client for refresh token rotation.
12773
+ # When enabled, your app client issues new ID, access, and refresh
12774
+ # tokens when users renew their sessions with refresh tokens. When
12775
+ # disabled, token refresh issues only ID and access tokens.
12776
+ # @return [Types::RefreshTokenRotationType]
12777
+ #
12617
12778
  # @see http://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/UserPoolClientType AWS API Documentation
12618
12779
  #
12619
12780
  class UserPoolClientType < Struct.new(
@@ -12641,7 +12802,8 @@ module Aws::CognitoIdentityProvider
12641
12802
  :prevent_user_existence_errors,
12642
12803
  :enable_token_revocation,
12643
12804
  :enable_propagate_additional_user_context_data,
12644
- :auth_session_validity)
12805
+ :auth_session_validity,
12806
+ :refresh_token_rotation)
12645
12807
  SENSITIVE = [:client_id, :client_secret]
12646
12808
  include Aws::Structure
12647
12809
  end
@@ -13078,21 +13240,22 @@ module Aws::CognitoIdentityProvider
13078
13240
  # @!attribute [rw] user_status
13079
13241
  # The user status. This can be one of the following:
13080
13242
  #
13081
- # * UNCONFIRMED - User has been created but not confirmed.
13082
- #
13083
- # * CONFIRMED - User has been confirmed.
13243
+ # * `UNCONFIRMED`: User has been created but not confirmed.
13084
13244
  #
13085
- # * EXTERNAL\_PROVIDER - User signed in with a third-party IdP.
13245
+ # * `CONFIRMED`: User has been confirmed.
13086
13246
  #
13087
- # * UNKNOWN - User status isn't known.
13247
+ # * `EXTERNAL_PROVIDER`: User signed in with a third-party IdP.
13088
13248
  #
13089
- # * RESET\_REQUIRED - User is confirmed, but the user must request a
13249
+ # * `RESET_REQUIRED`: User is confirmed, but the user must request a
13090
13250
  # code and reset their password before they can sign in.
13091
13251
  #
13092
- # * FORCE\_CHANGE\_PASSWORD - The user is confirmed and the user can
13252
+ # * `FORCE_CHANGE_PASSWORD`: The user is confirmed and the user can
13093
13253
  # sign in using a temporary password, but on first sign-in, the user
13094
13254
  # must change their password to a new value before doing anything
13095
13255
  # else.
13256
+ #
13257
+ # The statuses `ARCHIVED`, `UNKNOWN`, and `COMPROMISED` are no longer
13258
+ # used.
13096
13259
  # @return [String]
13097
13260
  #
13098
13261
  # @!attribute [rw] mfa_options
@@ -54,7 +54,7 @@ module Aws::CognitoIdentityProvider
54
54
  autoload :EndpointProvider, 'aws-sdk-cognitoidentityprovider/endpoint_provider'
55
55
  autoload :Endpoints, 'aws-sdk-cognitoidentityprovider/endpoints'
56
56
 
57
- GEM_VERSION = '1.117.0'
57
+ GEM_VERSION = '1.119.0'
58
58
 
59
59
  end
60
60
 
data/sig/client.rbs CHANGED
@@ -833,7 +833,11 @@ module Aws
833
833
  ?prevent_user_existence_errors: ("LEGACY" | "ENABLED"),
834
834
  ?enable_token_revocation: bool,
835
835
  ?enable_propagate_additional_user_context_data: bool,
836
- ?auth_session_validity: ::Integer
836
+ ?auth_session_validity: ::Integer,
837
+ ?refresh_token_rotation: {
838
+ feature: ("ENABLED" | "DISABLED"),
839
+ retry_grace_period_seconds: ::Integer?
840
+ }
837
841
  ) -> _CreateUserPoolClientResponseSuccess
838
842
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _CreateUserPoolClientResponseSuccess
839
843
 
@@ -1120,6 +1124,20 @@ module Aws
1120
1124
  ) -> _GetSigningCertificateResponseSuccess
1121
1125
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _GetSigningCertificateResponseSuccess
1122
1126
 
1127
+ interface _GetTokensFromRefreshTokenResponseSuccess
1128
+ include ::Seahorse::Client::_ResponseSuccess[Types::GetTokensFromRefreshTokenResponse]
1129
+ def authentication_result: () -> Types::AuthenticationResultType
1130
+ end
1131
+ # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/CognitoIdentityProvider/Client.html#get_tokens_from_refresh_token-instance_method
1132
+ def get_tokens_from_refresh_token: (
1133
+ refresh_token: ::String,
1134
+ client_id: ::String,
1135
+ ?client_secret: ::String,
1136
+ ?device_key: ::String,
1137
+ ?client_metadata: Hash[::String, ::String]
1138
+ ) -> _GetTokensFromRefreshTokenResponseSuccess
1139
+ | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _GetTokensFromRefreshTokenResponseSuccess
1140
+
1123
1141
  interface _GetUICustomizationResponseSuccess
1124
1142
  include ::Seahorse::Client::_ResponseSuccess[Types::GetUICustomizationResponse]
1125
1143
  def ui_customization: () -> Types::UICustomizationType
@@ -1923,7 +1941,11 @@ module Aws
1923
1941
  ?prevent_user_existence_errors: ("LEGACY" | "ENABLED"),
1924
1942
  ?enable_token_revocation: bool,
1925
1943
  ?enable_propagate_additional_user_context_data: bool,
1926
- ?auth_session_validity: ::Integer
1944
+ ?auth_session_validity: ::Integer,
1945
+ ?refresh_token_rotation: {
1946
+ feature: ("ENABLED" | "DISABLED"),
1947
+ retry_grace_period_seconds: ::Integer?
1948
+ }
1927
1949
  ) -> _UpdateUserPoolClientResponseSuccess
1928
1950
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _UpdateUserPoolClientResponseSuccess
1929
1951
 
data/sig/errors.rbs CHANGED
@@ -93,6 +93,9 @@ module Aws
93
93
  class PreconditionNotMetException < ::Aws::Errors::ServiceError
94
94
  def message: () -> ::String
95
95
  end
96
+ class RefreshTokenReuseException < ::Aws::Errors::ServiceError
97
+ def message: () -> ::String
98
+ end
96
99
  class ResourceNotFoundException < ::Aws::Errors::ServiceError
97
100
  def message: () -> ::String
98
101
  end
data/sig/types.rbs CHANGED
@@ -631,6 +631,7 @@ module Aws::CognitoIdentityProvider
631
631
  attr_accessor enable_token_revocation: bool
632
632
  attr_accessor enable_propagate_additional_user_context_data: bool
633
633
  attr_accessor auth_session_validity: ::Integer
634
+ attr_accessor refresh_token_rotation: Types::RefreshTokenRotationType
634
635
  SENSITIVE: []
635
636
  end
636
637
 
@@ -1067,6 +1068,20 @@ module Aws::CognitoIdentityProvider
1067
1068
  SENSITIVE: []
1068
1069
  end
1069
1070
 
1071
+ class GetTokensFromRefreshTokenRequest
1072
+ attr_accessor refresh_token: ::String
1073
+ attr_accessor client_id: ::String
1074
+ attr_accessor client_secret: ::String
1075
+ attr_accessor device_key: ::String
1076
+ attr_accessor client_metadata: ::Hash[::String, ::String]
1077
+ SENSITIVE: [:refresh_token, :client_id, :client_secret]
1078
+ end
1079
+
1080
+ class GetTokensFromRefreshTokenResponse
1081
+ attr_accessor authentication_result: Types::AuthenticationResultType
1082
+ SENSITIVE: []
1083
+ end
1084
+
1070
1085
  class GetUICustomizationRequest
1071
1086
  attr_accessor user_pool_id: ::String
1072
1087
  attr_accessor client_id: ::String
@@ -1540,6 +1555,17 @@ module Aws::CognitoIdentityProvider
1540
1555
  SENSITIVE: []
1541
1556
  end
1542
1557
 
1558
+ class RefreshTokenReuseException
1559
+ attr_accessor message: ::String
1560
+ SENSITIVE: []
1561
+ end
1562
+
1563
+ class RefreshTokenRotationType
1564
+ attr_accessor feature: ("ENABLED" | "DISABLED")
1565
+ attr_accessor retry_grace_period_seconds: ::Integer
1566
+ SENSITIVE: []
1567
+ end
1568
+
1543
1569
  class ResendConfirmationCodeRequest
1544
1570
  attr_accessor client_id: ::String
1545
1571
  attr_accessor secret_hash: ::String
@@ -2009,6 +2035,7 @@ module Aws::CognitoIdentityProvider
2009
2035
  attr_accessor enable_token_revocation: bool
2010
2036
  attr_accessor enable_propagate_additional_user_context_data: bool
2011
2037
  attr_accessor auth_session_validity: ::Integer
2038
+ attr_accessor refresh_token_rotation: Types::RefreshTokenRotationType
2012
2039
  SENSITIVE: [:client_id]
2013
2040
  end
2014
2041
 
@@ -2151,6 +2178,7 @@ module Aws::CognitoIdentityProvider
2151
2178
  attr_accessor enable_token_revocation: bool
2152
2179
  attr_accessor enable_propagate_additional_user_context_data: bool
2153
2180
  attr_accessor auth_session_validity: ::Integer
2181
+ attr_accessor refresh_token_rotation: Types::RefreshTokenRotationType
2154
2182
  SENSITIVE: [:client_id, :client_secret]
2155
2183
  end
2156
2184
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-cognitoidentityprovider
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.117.0
4
+ version: 1.119.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-03-03 00:00:00.000000000 Z
11
+ date: 2025-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core