Skip to content

Commit f541d17

Browse files
authored
Chore(auth, smithy_aws, smithy, smithy_goldens): update amplify_auth_cognito_dart AWS SDK (#6239)
* Added GetTokensFromRefreshToken to sdk * Added Crc64Nvme Checksum * Updated amplify_auth_cognito_dart smithy sdk * Added getTokensFromRefreshToken to MockCognitoIdentityProviderClient * Pin json_serializable to prevent build_runner errors
1 parent 0f951e3 commit f541d17

File tree

181 files changed

+2560
-642
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

181 files changed

+2560
-642
lines changed

actions/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ dev_dependencies:
2424
build_runner: ^2.4.9
2525
build_test: ^3.1.1
2626
checks: ^0.3.0
27-
json_serializable: ^6.9.4
27+
json_serializable: ">=6.9.4 <6.10.0"
2828
test: ^1.22.1
2929

3030
aft:

packages/aft/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ dev_dependencies:
6868
build_runner: ^2.4.9
6969
built_value_generator: ^8.10.1
7070
checks: ^0.3.0
71-
json_serializable: ^6.9.4
71+
json_serializable: ">=6.9.4 <6.10.0"
7272
test: ^1.22.1
7373
test_descriptor: ^2.0.1
7474

packages/aft/test/config/config_loader_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ environment:
2020
sdk: ^3.8.0
2121
2222
dependencies:
23-
json_serializable: ^6.9.4
23+
json_serializable: ">=6.9.4 <6.10.0"
2424
''';
2525
await d.dir('repo', [d.file('pubspec.yaml', rootPubspec)]).create();
2626

@@ -53,7 +53,7 @@ environment:
5353
sdk: ^3.8.0
5454
5555
dependencies:
56-
json_serializable: ^6.9.4
56+
json_serializable: ">=6.9.4 <6.10.0"
5757
5858
aft:
5959
scripts:
@@ -72,7 +72,7 @@ environment:
7272
7373
dependencies:
7474
built_value: ^8.10.1
75-
json_serializable: ^6.9.4
75+
json_serializable: ">=6.9.4 <6.10.0"
7676
7777
aft:
7878
scripts:

packages/amplify/amplify_flutter/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ dev_dependencies:
3434
build_runner: ^2.4.9
3535
flutter_test:
3636
sdk: flutter
37-
json_serializable: ^6.9.4
37+
json_serializable: ">=6.9.4 <6.10.0"

packages/amplify_core/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ dev_dependencies:
3535
path: packages/code_excerpt_updater
3636
# TODO: Bump when global SDK >=3.1
3737
ref: 923adadacbb95f11d222e6fc6135f6dbb66f84ee
38-
json_serializable: ^6.9.4
38+
json_serializable: ">=6.9.4 <6.10.0"
3939
path: ^1.8.0
4040
test: ^1.22.1

packages/analytics/amplify_analytics_pinpoint/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ dev_dependencies:
3232
integration_test:
3333
sdk: flutter
3434
json_annotation: ^4.9.0
35-
json_serializable: ^6.9.4
35+
json_serializable: ">=6.9.4 <6.10.0"
3636

3737
# For information on the generic Dart part of this file, see the
3838
# following page: https://dart.dev/tools/pub/pubspec

packages/auth/amplify_auth_cognito_dart/lib/src/sdk/cognito_identity.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// Generated with smithy-dart 0.3.2. DO NOT MODIFY.
2-
// ignore_for_file: avoid_unused_constructor_parameters,deprecated_member_use_from_same_package,non_constant_identifier_names,require_trailing_commas,unnecessary_library_name
2+
// ignore_for_file: avoid_unused_constructor_parameters,deprecated_member_use_from_same_package,non_constant_identifier_names,unnecessary_library_name
33

44
/// # Amazon Cognito Identity
55
///
66
/// ## Amazon Cognito Federated Identities
77
///
88
/// Amazon Cognito Federated Identities is a web service that delivers scoped temporary credentials to mobile devices and other untrusted environments. It uniquely identifies a device and supplies the user with a consistent identity over the lifetime of an application.
99
///
10-
/// Using Amazon Cognito Federated Identities, you can enable authentication with one or more third-party identity providers (Facebook, Google, or Login with Amazon) or an Amazon Cognito user pool, and you can also choose to support unauthenticated access from your app. Cognito delivers a unique identifier for each user and acts as an OpenID token provider trusted by AWS Security Token Service (STS) to access temporary, limited-privilege AWS credentials.
10+
/// Using Amazon Cognito Federated Identities, you can enable authentication with one or more third-party identity providers (Facebook, Google, or Login with Amazon) or an Amazon Cognito user pool, and you can also choose to support unauthenticated access from your app. Cognito delivers a unique identifier for each user and acts as an OpenID token provider trusted by Security Token Service (STS) to access temporary, limited-privilege Amazon Web Services credentials.
1111
///
1212
/// For a description of the authentication flow from the Amazon Cognito Developer Guide see [Authentication Flow](https://docs.aws.amazon.com/cognito/latest/developerguide/authentication-flow.html).
1313
///

packages/auth/amplify_auth_cognito_dart/lib/src/sdk/cognito_identity_provider.dart

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// Generated with smithy-dart 0.3.2. DO NOT MODIFY.
2-
// ignore_for_file: avoid_unused_constructor_parameters,deprecated_member_use_from_same_package,non_constant_identifier_names,require_trailing_commas,unnecessary_library_name
2+
// ignore_for_file: avoid_unused_constructor_parameters,deprecated_member_use_from_same_package,non_constant_identifier_names,unnecessary_library_name
33

44
/// # Amazon Cognito Identity Provider
55
///
6-
/// With the Amazon Cognito user pools API, you can configure user pools and authenticate users. To authenticate users from third-party identity providers (IdPs) in this API, you can [link IdP users to native user profiles](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-identity-federation-consolidate-users.html). Learn more about the authentication and authorization of federated users at [Adding user pool sign-in through a third party](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-identity-federation.html) and in the [User pool federation endpoints and hosted UI reference](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-userpools-server-contract-reference.html).
6+
/// With the Amazon Cognito user pools API, you can configure user pools and authenticate users. To authenticate users from third-party identity providers (IdPs) in this API, you can [link IdP users to native user profiles](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-identity-federation-consolidate-users.html). Learn more about the authentication and authorization of federated users at [Adding user pool sign-in through a third party](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-identity-federation.html) and in the [User pool federation endpoints and managed login reference](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-userpools-server-contract-reference.html).
77
///
88
/// This API reference provides detailed information about API operations and object types in Amazon Cognito.
99
///
@@ -16,28 +16,9 @@
1616
/// 3. A client-side app, like a mobile app, that wants to make unauthenticated requests to manage, authenticate, or authorize a user.
1717
///
1818
///
19-
/// For more information, see [Using the Amazon Cognito user pools API and user pool endpoints](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html) in the _Amazon Cognito Developer Guide_.
20-
///
21-
/// With your Amazon Web Services SDK, you can build the logic to support operational flows in every use case for this API. You can also make direct REST API requests to [Amazon Cognito user pools service endpoints](https://docs.aws.amazon.com/general/latest/gr/cognito_identity.html#cognito_identity_your_user_pools_region). The following links can get you started with the `CognitoIdentityProvider` client in other supported Amazon Web Services SDKs.
22-
///
23-
/// * [Amazon Web Services Command Line Interface](https://docs.aws.amazon.com/cli/latest/reference/cognito-idp/index.html#cli-aws-cognito-idp)
24-
///
25-
/// * [Amazon Web Services SDK for .NET](https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/CognitoIdentityProvider/TCognitoIdentityProviderClient.html)
26-
///
27-
/// * [Amazon Web Services SDK for C++](https://sdk.amazonaws.com/cpp/api/LATEST/aws-cpp-sdk-cognito-idp/html/class_aws_1_1_cognito_identity_provider_1_1_cognito_identity_provider_client.html)
28-
///
29-
/// * [Amazon Web Services SDK for Go](https://docs.aws.amazon.com/sdk-for-go/api/service/cognitoidentityprovider/#CognitoIdentityProvider)
30-
///
31-
/// * [Amazon Web Services SDK for Java V2](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/cognitoidentityprovider/CognitoIdentityProviderClient.html)
32-
///
33-
/// * [Amazon Web Services SDK for JavaScript](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CognitoIdentityServiceProvider.html)
34-
///
35-
/// * [Amazon Web Services SDK for PHP V3](https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-cognito-idp-2016-04-18.html)
36-
///
37-
/// * [Amazon Web Services SDK for Python](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/cognito-idp.html)
38-
///
39-
/// * [Amazon Web Services SDK for Ruby V3](https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/CognitoIdentityProvider/Client.html)
19+
/// For more information, see [Understanding API, OIDC, and managed login pages authentication](https://docs.aws.amazon.com/cognito/latest/developerguide/authentication-flows-public-server-side.html#user-pools-API-operations) in the _Amazon Cognito Developer Guide_.
4020
///
21+
/// With your Amazon Web Services SDK, you can build the logic to support operational flows in every use case for this API. You can also make direct REST API requests to [Amazon Cognito user pools service endpoints](https://docs.aws.amazon.com/general/latest/gr/cognito_identity.html#cognito_identity_your_user_pools_region). The following links can get you started with the `CognitoIdentityProvider` client in supported Amazon Web Services SDKs.
4122
///
4223
/// To get started with an Amazon Web Services SDK, see [Tools to Build on Amazon Web Services](http://aws.amazon.com/developer/tools/). For example actions and scenarios, see [Code examples for Amazon Cognito Identity Provider using Amazon Web Services SDKs](https://docs.aws.amazon.com/cognito/latest/developerguide/service_code_examples_cognito-identity-provider.html).
4324
library amplify_auth_cognito_dart.cognito_identity_provider;
@@ -65,6 +46,7 @@ export 'package:amplify_auth_cognito_dart/src/sdk/src/cognito_identity_provider/
6546
export 'package:amplify_auth_cognito_dart/src/sdk/src/cognito_identity_provider/model/confirm_sign_up_response.dart';
6647
export 'package:amplify_auth_cognito_dart/src/sdk/src/cognito_identity_provider/model/delete_user_request.dart';
6748
export 'package:amplify_auth_cognito_dart/src/sdk/src/cognito_identity_provider/model/delivery_medium_type.dart';
49+
export 'package:amplify_auth_cognito_dart/src/sdk/src/cognito_identity_provider/model/device_key_exists_exception.dart';
6850
export 'package:amplify_auth_cognito_dart/src/sdk/src/cognito_identity_provider/model/device_remembered_status_type.dart';
6951
export 'package:amplify_auth_cognito_dart/src/sdk/src/cognito_identity_provider/model/device_secret_verifier_config_type.dart';
7052
export 'package:amplify_auth_cognito_dart/src/sdk/src/cognito_identity_provider/model/device_type.dart';
@@ -77,6 +59,8 @@ export 'package:amplify_auth_cognito_dart/src/sdk/src/cognito_identity_provider/
7759
export 'package:amplify_auth_cognito_dart/src/sdk/src/cognito_identity_provider/model/forgot_password_response.dart';
7860
export 'package:amplify_auth_cognito_dart/src/sdk/src/cognito_identity_provider/model/get_device_request.dart';
7961
export 'package:amplify_auth_cognito_dart/src/sdk/src/cognito_identity_provider/model/get_device_response.dart';
62+
export 'package:amplify_auth_cognito_dart/src/sdk/src/cognito_identity_provider/model/get_tokens_from_refresh_token_request.dart';
63+
export 'package:amplify_auth_cognito_dart/src/sdk/src/cognito_identity_provider/model/get_tokens_from_refresh_token_response.dart';
8064
export 'package:amplify_auth_cognito_dart/src/sdk/src/cognito_identity_provider/model/get_user_attribute_verification_code_request.dart';
8165
export 'package:amplify_auth_cognito_dart/src/sdk/src/cognito_identity_provider/model/get_user_attribute_verification_code_response.dart';
8266
export 'package:amplify_auth_cognito_dart/src/sdk/src/cognito_identity_provider/model/get_user_request.dart';
@@ -102,6 +86,7 @@ export 'package:amplify_auth_cognito_dart/src/sdk/src/cognito_identity_provider/
10286
export 'package:amplify_auth_cognito_dart/src/sdk/src/cognito_identity_provider/model/not_authorized_exception.dart';
10387
export 'package:amplify_auth_cognito_dart/src/sdk/src/cognito_identity_provider/model/password_history_policy_violation_exception.dart';
10488
export 'package:amplify_auth_cognito_dart/src/sdk/src/cognito_identity_provider/model/password_reset_required_exception.dart';
89+
export 'package:amplify_auth_cognito_dart/src/sdk/src/cognito_identity_provider/model/refresh_token_reuse_exception.dart';
10590
export 'package:amplify_auth_cognito_dart/src/sdk/src/cognito_identity_provider/model/resend_confirmation_code_request.dart';
10691
export 'package:amplify_auth_cognito_dart/src/sdk/src/cognito_identity_provider/model/resend_confirmation_code_response.dart';
10792
export 'package:amplify_auth_cognito_dart/src/sdk/src/cognito_identity_provider/model/resource_not_found_exception.dart';

packages/auth/amplify_auth_cognito_dart/lib/src/sdk/sdk_bridge.dart

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,30 @@ class WrappedCognitoIdentityProviderClient
746746
responseProgress: operation.responseProgress,
747747
);
748748
}
749+
750+
@override
751+
SmithyOperation<GetTokensFromRefreshTokenResponse> getTokensFromRefreshToken(
752+
GetTokensFromRefreshTokenRequest input, {
753+
AWSHttpClient? client,
754+
AWSCredentialsProvider? credentialsProvider,
755+
}) {
756+
final operation = _base.getTokensFromRefreshToken(
757+
input,
758+
client: client ?? _dependencyManager.getOrCreate<AmplifyHttpClient>(),
759+
credentialsProvider: credentialsProvider,
760+
);
761+
return SmithyOperation(
762+
operation.operation.then(
763+
(res) => res,
764+
onError: (e, st) {
765+
Error.throwWithStackTrace(transformSdkException(e), st);
766+
},
767+
),
768+
operationName: operation.runtimeTypeName,
769+
requestProgress: operation.requestProgress,
770+
responseProgress: operation.responseProgress,
771+
);
772+
}
749773
}
750774

751775
/// Get/set helpers for MFA settings.

packages/auth/amplify_auth_cognito_dart/lib/src/sdk/sdk_exception.dart

Lines changed: 41 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)