From f551d4e1e5c79afee0d6ecd19a69c754a455a369 Mon Sep 17 00:00:00 2001 From: Gustavo Gamino Date: Thu, 18 Mar 2021 10:55:35 -0300 Subject: [PATCH 1/6] refactor: Upgrade dependencies to null-safety --- example/.flutter-plugins-dependencies | 2 +- example/pubspec.yaml | 3 +++ pubspec.yaml | 16 ++++++++-------- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies index d597af0..3d2a3c9 100644 --- a/example/.flutter-plugins-dependencies +++ b/example/.flutter-plugins-dependencies @@ -1 +1 @@ -{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"shared_preferences","dependencies":[]}]} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences","path":"/Users/gamino/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.4.3/","dependencies":[]}],"android":[{"name":"shared_preferences","path":"/Users/gamino/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.4.3/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"shared_preferences","dependencies":[]}],"date_created":"2021-03-18 10:36:08.068715","version":"2.0.2"} \ No newline at end of file diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 911178d..d0dd086 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -15,3 +15,6 @@ dev_dependencies: flutter: uses-material-design: true + +environment: + sdk: '>=2.10.0 <3.0.0' diff --git a/pubspec.yaml b/pubspec.yaml index e2a623c..64b2d58 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -6,18 +6,18 @@ description: Unofficial Amazon Cognito Identity Provider Dart SDK, with AWS Cloud Services. Based on amazon-cognito-identity-dart dependencies: - crypto: ^2.0.2+1 - http: ^0.12.0 - convert: ^2.1.1 + crypto: ^3.0.0 + http: ^0.13.0 + convert: ^3.0.0 dev_dependencies: flutter_test: sdk: flutter - pedantic: 1.8.0+1 - test: ^1.4.0 + pedantic: ^1.11.0 + test: ^1.16.0 -dependency_overrides: - pedantic: 1.9.0 +# dependency_overrides: +# pedantic: 1.9.0 environment: - sdk: ">=2.1.0 <3.0.0" + sdk: '>=2.10.0 <3.0.0' From 02f40ad14a7b38525fc876233d882366f8f7e5dd Mon Sep 17 00:00:00 2001 From: Gustavo Gamino Date: Thu, 18 Mar 2021 10:56:04 -0300 Subject: [PATCH 2/6] refactor(lib): Upgrade post method parameter type --- lib/src/client.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/client.dart b/lib/src/client.dart index c40c15f..945e3e8 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -41,7 +41,7 @@ class Client { http.Response response; try { response = await _client.post( - endpointReq, + Uri.parse(endpointReq), headers: headersReq, body: body, ); From ee4d4f3a3dbc0cb3e837ac9cac26d5f27f804de7 Mon Sep 17 00:00:00 2001 From: Gustavo Gamino Date: Thu, 18 Mar 2021 11:10:13 -0300 Subject: [PATCH 3/6] fix(pubspec): SDK version --- example/.flutter-plugins-dependencies | 2 +- example/pubspec.yaml | 2 +- pubspec.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies index 3d2a3c9..c7d276f 100644 --- a/example/.flutter-plugins-dependencies +++ b/example/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences","path":"/Users/gamino/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.4.3/","dependencies":[]}],"android":[{"name":"shared_preferences","path":"/Users/gamino/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.4.3/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"shared_preferences","dependencies":[]}],"date_created":"2021-03-18 10:36:08.068715","version":"2.0.2"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences","path":"/Users/gamino/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.4.3/","dependencies":[]}],"android":[{"name":"shared_preferences","path":"/Users/gamino/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.4.3/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"shared_preferences","dependencies":[]}],"date_created":"2021-03-18 10:59:48.691080","version":"2.0.2"} \ No newline at end of file diff --git a/example/pubspec.yaml b/example/pubspec.yaml index d0dd086..5fa0ae0 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -17,4 +17,4 @@ flutter: uses-material-design: true environment: - sdk: '>=2.10.0 <3.0.0' + sdk: '>=2.12.0 <3.0.0' diff --git a/pubspec.yaml b/pubspec.yaml index 64b2d58..4e70f2b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -20,4 +20,4 @@ dev_dependencies: # pedantic: 1.9.0 environment: - sdk: '>=2.10.0 <3.0.0' + sdk: '>=2.12.0 <3.0.0' From 3a3af77a987e5155ce543c37043c4e0967e4a9fe Mon Sep 17 00:00:00 2001 From: Gustavo Gamino Date: Thu, 18 Mar 2021 11:11:04 -0300 Subject: [PATCH 4/6] refactor(all): Null safety migration applied --- lib/sig_v4.dart | 82 ++++---- lib/src/attribute_arg.dart | 6 +- lib/src/authentication_details.dart | 16 +- lib/src/authentication_helper.dart | 68 +++--- lib/src/client.dart | 30 +-- lib/src/cognito_access_token.dart | 2 +- lib/src/cognito_client_exceptions.dart | 8 +- lib/src/cognito_credentials.dart | 26 +-- lib/src/cognito_id_token.dart | 2 +- lib/src/cognito_identity_id.dart | 26 +-- lib/src/cognito_jwt_token.dart | 8 +- lib/src/cognito_refresh_token.dart | 6 +- lib/src/cognito_user.dart | 278 ++++++++++++------------- lib/src/cognito_user_attribute.dart | 10 +- lib/src/cognito_user_exceptions.dart | 32 +-- lib/src/cognito_user_pool.dart | 46 ++-- lib/src/cognito_user_session.dart | 12 +- lib/src/random_string_helper.dart | 2 +- test/authentication_helper_test.dart | 2 +- test/cognito_user_pool_test.dart | 4 +- test/sig_v4_helper_test.dart | 2 +- test/test_storage.dart | 6 +- 22 files changed, 337 insertions(+), 337 deletions(-) diff --git a/lib/sig_v4.dart b/lib/sig_v4.dart index 192e6c7..b786ef3 100644 --- a/lib/sig_v4.dart +++ b/lib/sig_v4.dart @@ -14,12 +14,12 @@ const _default_content_type = 'application/json'; const _default_accept_type = 'application/json'; class AwsSigV4Client { - String endpoint; - String pathComponent; + late String endpoint; + String? pathComponent; String region; String accessKey; String secretKey; - String sessionToken; + String? sessionToken; String serviceName; String defaultContentType; String defaultAcceptType; @@ -36,25 +36,25 @@ class AwsSigV4Client { } class SigV4Request { - String method; - String path; - Map queryParams; - Map headers; - String authorizationHeader; - String url; - String body; + String? method; + late String path; + Map? queryParams; + Map? headers; + String? authorizationHeader; + String? url; + late String body; AwsSigV4Client awsSigV4Client; - String canonicalRequest; - String hashedCanonicalRequest; - String credentialScope; - String stringToSign; - String datetime; - List signingKey; - String signature; + late String canonicalRequest; + String? hashedCanonicalRequest; + String? credentialScope; + late String stringToSign; + String? datetime; + late List signingKey; + late String signature; SigV4Request( this.awsSigV4Client, { - String method, - String path, + required String method, + String? path, this.datetime, this.queryParams, this.headers, @@ -65,11 +65,11 @@ class SigV4Request { this.path = '${awsSigV4Client.pathComponent}$path'; headers = headers ?? {}; - if (headers['Content-Type'] == null && this.method != 'GET') { - headers['Content-Type'] = awsSigV4Client.defaultContentType; + if (headers!['Content-Type'] == null && this.method != 'GET') { + headers!['Content-Type'] = awsSigV4Client.defaultContentType; } - if (headers['Accept'] == null) { - headers['Accept'] = awsSigV4Client.defaultAcceptType; + if (headers!['Accept'] == null) { + headers!['Accept'] = awsSigV4Client.defaultAcceptType; } if (body == null || this.method == 'GET') { this.body = ''; @@ -77,20 +77,20 @@ class SigV4Request { this.body = json.encode(body); } if (body == '') { - headers.remove('Content-Type'); + headers!.remove('Content-Type'); } datetime = datetime ?? SigV4.generateDatetime(); - headers[_x_amz_date] = datetime; + headers![_x_amz_date] = datetime; final endpointUri = Uri.parse(awsSigV4Client.endpoint); - headers[_host] = endpointUri.host; + headers![_host] = endpointUri.host; - headers[_authorization] = - authorizationHeader ?? _generateAuthorization(datetime); + headers![_authorization] = + authorizationHeader ?? _generateAuthorization(datetime!); if (awsSigV4Client.sessionToken != null) { - headers[_x_amz_security_token] = awsSigV4Client.sessionToken; + headers![_x_amz_security_token] = awsSigV4Client.sessionToken; } - headers.remove(_host); + headers!.remove(_host); url = _generateUrl(); } @@ -108,7 +108,7 @@ class SigV4Request { String _generateAuthorization(String datetime) { canonicalRequest = - SigV4.buildCanonicalRequest(method, path, queryParams, headers, body); + SigV4.buildCanonicalRequest(method, path, queryParams, headers!, body); hashedCanonicalRequest = SigV4.hashCanonicalRequest(canonicalRequest); credentialScope = SigV4.buildCredentialScope( datetime, awsSigV4Client.region, awsSigV4Client.serviceName); @@ -118,7 +118,7 @@ class SigV4Request { awsSigV4Client.region, awsSigV4Client.serviceName); signature = SigV4.calculateSignature(signingKey, stringToSign); return SigV4.buildAuthorizationHeader( - awsSigV4Client.accessKey, credentialScope, headers, signature); + awsSigV4Client.accessKey, credentialScope!, headers!, signature); } } @@ -155,7 +155,7 @@ class SigV4 { return Uri.encodeFull(uri); } - static String buildCanonicalQueryString(Map queryParams) { + static String buildCanonicalQueryString(Map? queryParams) { if (queryParams == null) { return ''; } @@ -169,13 +169,13 @@ class SigV4 { final canonicalQueryStrings = []; sortedQueryParams.forEach((key) { canonicalQueryStrings - .add('$key=${Uri.encodeComponent(queryParams[key])}'); + .add('$key=${Uri.encodeComponent(queryParams[key]!)}'); }); return canonicalQueryStrings.join('&'); } - static String buildCanonicalHeaders(Map headers) { + static String buildCanonicalHeaders(Map headers) { final sortedKeys = []; headers.forEach((property, _) { sortedKeys.add(property); @@ -191,7 +191,7 @@ class SigV4 { return canonicalHeaders; } - static String buildCanonicalSignedHeaders(Map headers) { + static String buildCanonicalSignedHeaders(Map headers) { final sortedKeys = []; headers.forEach((property, _) { sortedKeys.add(property.toLowerCase()); @@ -202,7 +202,7 @@ class SigV4 { } static String buildStringToSign( - String datetime, String credentialScope, String hashedCanonicalRequest) { + String datetime, String? credentialScope, String? hashedCanonicalRequest) { return '$_aws_sha_256\n$datetime\n$credentialScope\n$hashedCanonicalRequest'; } @@ -212,10 +212,10 @@ class SigV4 { } static String buildCanonicalRequest( - String method, + String? method, String path, - Map queryParams, - Map headers, + Map? queryParams, + Map headers, String payload) { final canonicalRequest = [ method, @@ -229,7 +229,7 @@ class SigV4 { } static String buildAuthorizationHeader(String accessKey, - String credentialScope, Map headers, String signature) { + String credentialScope, Map headers, String signature) { return _aws_sha_256 + ' Credential=' + accessKey + diff --git a/lib/src/attribute_arg.dart b/lib/src/attribute_arg.dart index b6c73cd..27dae46 100644 --- a/lib/src/attribute_arg.dart +++ b/lib/src/attribute_arg.dart @@ -1,8 +1,8 @@ import 'dart:convert'; class AttributeArg { - final String name; - final String value; + final String? name; + final String? value; const AttributeArg({this.name, this.value}); @@ -13,7 +13,7 @@ class AttributeArg { return encoded.toString(); } - Map toJson() { + Map toJson() { return { 'Name': name, 'Value': value, diff --git a/lib/src/authentication_details.dart b/lib/src/authentication_details.dart index 66429e0..b4046a4 100644 --- a/lib/src/authentication_details.dart +++ b/lib/src/authentication_details.dart @@ -1,10 +1,10 @@ import 'attribute_arg.dart'; class AuthenticationDetails { - String username; - String password; - Map validationData; - List authParameters; + String? username; + String? password; + Map? validationData; + List? authParameters; AuthenticationDetails({ this.username, this.password, @@ -12,19 +12,19 @@ class AuthenticationDetails { this.authParameters, }); - String getUsername() { + String? getUsername() { return username; } - String getPassword() { + String? getPassword() { return password; } - Map getValidationData() { + Map? getValidationData() { return validationData; } - List getAuthParameters() { + List? getAuthParameters() { return authParameters; } } diff --git a/lib/src/authentication_helper.dart b/lib/src/authentication_helper.dart index bfcc6f3..1d7d01c 100644 --- a/lib/src/authentication_helper.dart +++ b/lib/src/authentication_helper.dart @@ -26,23 +26,23 @@ final String _newPasswordRequiredChallengeUserAttributePrefix = 'userAttributes.'; class AuthenticationHelper { - String poolName; - BigInt N; - BigInt g; - BigInt k; - List _infoBits; - BigInt _smallAValue; - BigInt _largeAValue; - String _uHexHash; - BigInt _uValue; - String _randomPassword; - String _saltToHashDevices; - String _verifierDevices; + String? poolName; + BigInt? N; + BigInt? g; + late BigInt k; + late List _infoBits; + BigInt? _smallAValue; + BigInt? _largeAValue; + late String _uHexHash; + BigInt? _uValue; + String? _randomPassword; + String? _saltToHashDevices; + String? _verifierDevices; AuthenticationHelper(this.poolName) { N = BigInt.parse(initN, radix: 16); g = BigInt.parse('2', radix: 16); k = BigInt.parse( - hexHash('00${N.toRadixString(16)}0${g.toRadixString(16)}'), + hexHash('00${N!.toRadixString(16)}0${g!.toRadixString(16)}'), radix: 16, ); _smallAValue = generateRandomSmallA(); @@ -50,27 +50,27 @@ class AuthenticationHelper { _infoBits = utf8.encode('Caldera Derived Key'); } - BigInt getSmallAValue() { + BigInt? getSmallAValue() { return _smallAValue; } - BigInt getLargeAValue() { + BigInt? getLargeAValue() { if (_largeAValue != null) { return _largeAValue; } - _largeAValue = calculateA(_smallAValue); + _largeAValue = calculateA(_smallAValue!); return _largeAValue; } - String getRandomPassword() { + String? getRandomPassword() { return _randomPassword; } - String getSaltDevices() { + String? getSaltDevices() { return _saltToHashDevices; } - String getVerifierDevices() { + String? getVerifierDevices() { return _verifierDevices; } @@ -81,11 +81,11 @@ class AuthenticationHelper { /// Calculates the final hkdf based on computed S value, and computed U value and the key List getPasswordAuthenticationKey( - String username, String password, BigInt serverBValue, BigInt salt) { - if (serverBValue % N == BigInt.zero) { + String? username, String? password, BigInt serverBValue, BigInt salt) { + if (serverBValue % N! == BigInt.zero) { throw ArgumentError('B cannot be zero.'); } - _uValue = calculateU(_largeAValue, serverBValue); + _uValue = calculateU(_largeAValue!, serverBValue); if (_uValue == BigInt.zero) { throw ArgumentError('U cannot be zero.'); } @@ -97,7 +97,7 @@ class AuthenticationHelper { final sValue = calculateS(xValue, serverBValue); final hkdf = - computehkdf(hex.decode(padHex(sValue)), hex.decode(padHex(_uValue))); + computehkdf(hex.decode(padHex(sValue)), hex.decode(padHex(_uValue!))); return hkdf; } @@ -107,7 +107,7 @@ class AuthenticationHelper { final randomBigInt = BigInt.parse(hexRandom, radix: 16); - final smallABigInt = randomBigInt % N; + final smallABigInt = randomBigInt % N!; return smallABigInt; } @@ -118,7 +118,7 @@ class AuthenticationHelper { } /// Generate salts and compute verifier. - void generateHashDevice(String deviceGroupKey, String deviceKey) { + void generateHashDevice(String? deviceGroupKey, String? deviceKey) { _randomPassword = generateRandomString(); final combinedString = '$deviceGroupKey$deviceKey:$_randomPassword'; final hashedString = hash(utf8.encode(combinedString)); @@ -129,7 +129,7 @@ class AuthenticationHelper { final verifierDevicesNotPadded = modPow( g, - BigInt.parse(hexHash(_saltToHashDevices + hashedString), radix: 16), + BigInt.parse(hexHash(_saltToHashDevices! + hashedString), radix: 16), N, ); @@ -151,7 +151,7 @@ class AuthenticationHelper { /// with the generated random number a BigInt calculateA(BigInt a) { final A = modPow(g, a, N); - if ((A % N) == BigInt.zero) { + if ((A % N!) == BigInt.zero) { throw Exception('Illegal paramater. A mod N cannot be 0.'); } return A; @@ -169,28 +169,28 @@ class AuthenticationHelper { final intValue2 = serverBValue - (k * gModPowXN); final result = modPow( intValue2, - _smallAValue + (_uValue * xValue), + _smallAValue! + (_uValue! * xValue), N, ); - return result % N; + return result % N!; } /// Temporary workaround to BigInt.modPow's bug /// Based on https://github.com/dart-lang/googleapis_auth/blob/master/lib/src/crypto/rsa.dart - BigInt modPow(BigInt b, BigInt e, BigInt m) { + BigInt modPow(BigInt? b, BigInt e, BigInt? m) { if (e < BigInt.one) { return BigInt.one; } - if (b < BigInt.zero || b > m) { - b = b % m; + if (b! < BigInt.zero || b > m!) { + b = b % m!; } var r = BigInt.one; while (e > BigInt.zero) { if ((e & BigInt.one) > BigInt.zero) { - r = (r * b) % m; + r = (r * b!) % m; } e >>= 1; - b = (b * b) % m; + b = (b! * b) % m; } return r; } diff --git a/lib/src/client.dart b/lib/src/client.dart index 945e3e8..2a27b8c 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -5,18 +5,18 @@ import 'package:http/http.dart' as http; import 'cognito_client_exceptions.dart'; class Client { - String _service; - String _userAgent; - String _region; - String endpoint; - http.Client _client; + String? _service; + String? _userAgent; + String? _region; + String? endpoint; + late http.Client _client; Client({ - String endpoint, - String region, + String? endpoint, + String? region, String service = 'AWSCognitoIdentityProviderService', - http.Client client, - String userAgent = 'aws-amplify/0.0.x dart', + http.Client? client, + String? userAgent = 'aws-amplify/0.0.x dart', }) { _region = region; _service = service; @@ -27,8 +27,8 @@ class Client { /// Makes requests on AWS API service provider dynamic request(String operation, Map params, - {String endpoint, String service}) async { - final endpointReq = endpoint ?? this.endpoint; + {String? endpoint, String? service}) async { + final endpointReq = endpoint ?? this.endpoint!; final targetService = service ?? _service; final body = json.encode(params); @@ -42,7 +42,7 @@ class Client { try { response = await _client.post( Uri.parse(endpointReq), - headers: headersReq, + headers: headersReq as Map?, body: body, ); } catch (e) { @@ -67,7 +67,7 @@ class Client { var errorType = 'UnknownError'; for (final header in response.headers.keys) { if (header.toLowerCase() == 'x-amzn-errortype') { - errorType = response.headers[header].split(':')[0]; + errorType = response.headers[header]!.split(':')[0]; break; } } @@ -79,8 +79,8 @@ class Client { statusCode: response.statusCode, ); } - final String dataType = data['__type']; - final String dataCode = data['code']; + final String? dataType = data['__type']; + final String? dataCode = data['code']; final code = (dataType ?? dataCode ?? errorType).split('#').removeLast(); throw CognitoClientException( data['message'] ?? 'Cognito client request error with unknown message', diff --git a/lib/src/cognito_access_token.dart b/lib/src/cognito_access_token.dart index 3d4c9e1..a6a8211 100644 --- a/lib/src/cognito_access_token.dart +++ b/lib/src/cognito_access_token.dart @@ -1,5 +1,5 @@ import 'cognito_jwt_token.dart'; class CognitoAccessToken extends CognitoJwtToken { - CognitoAccessToken(String token) : super(token); + CognitoAccessToken(String? token) : super(token); } diff --git a/lib/src/cognito_client_exceptions.dart b/lib/src/cognito_client_exceptions.dart index 03d810a..559faee 100644 --- a/lib/src/cognito_client_exceptions.dart +++ b/lib/src/cognito_client_exceptions.dart @@ -1,8 +1,8 @@ class CognitoClientException implements Exception { - int statusCode; - String code; - String name; - String message; + int? statusCode; + String? code; + String? name; + String? message; CognitoClientException( this.message, { this.code, diff --git a/lib/src/cognito_credentials.dart b/lib/src/cognito_credentials.dart index 1a23245..0f8bb6a 100644 --- a/lib/src/cognito_credentials.dart +++ b/lib/src/cognito_credentials.dart @@ -6,30 +6,30 @@ import 'cognito_identity_id.dart'; import 'cognito_user_pool.dart'; class CognitoCredentials { - final String _region; + final String? _region; final String _identityPoolId; final CognitoUserPool _pool; - final Client _client; + final Client? _client; int _retryCount = 0; - String accessKeyId; - String secretAccessKey; - String sessionToken; - int expireTime; - String userIdentityId; + String? accessKeyId; + String? secretAccessKey; + String? sessionToken; + int? expireTime; + String? userIdentityId; CognitoCredentials( this._identityPoolId, this._pool, { - String region, - String userPoolId, + String? region, + String? userPoolId, }) : _region = region ?? _pool.getRegion(), _client = _pool.client; /// Get AWS Credentials for authenticated user - Future getAwsCredentials(token, [String authenticator]) async { + Future getAwsCredentials(token, [String? authenticator]) async { if (!(expireTime == null || - DateTime.now().millisecondsSinceEpoch > expireTime - 60000)) { + DateTime.now().millisecondsSinceEpoch > expireTime! - 60000)) { return; } @@ -40,7 +40,7 @@ class CognitoCredentials { Future getGuestAwsCredentialsId() async { if (!(expireTime == null || - DateTime.now().millisecondsSinceEpoch > expireTime - 60000)) { + DateTime.now().millisecondsSinceEpoch > expireTime! - 60000)) { return; } @@ -58,7 +58,7 @@ class CognitoCredentials { var data; try { - data = await _client.request('GetCredentialsForIdentity', paramsReq, + data = await _client!.request('GetCredentialsForIdentity', paramsReq, service: 'AWSCognitoIdentityService', endpoint: 'https://cognito-identity.$_region.amazonaws.com/'); } on CognitoClientException catch (e) { diff --git a/lib/src/cognito_id_token.dart b/lib/src/cognito_id_token.dart index 4d917ec..9fcd135 100644 --- a/lib/src/cognito_id_token.dart +++ b/lib/src/cognito_id_token.dart @@ -1,5 +1,5 @@ import 'cognito_jwt_token.dart'; class CognitoIdToken extends CognitoJwtToken { - CognitoIdToken(String idToken) : super(idToken); + CognitoIdToken(String? idToken) : super(idToken); } diff --git a/lib/src/cognito_identity_id.dart b/lib/src/cognito_identity_id.dart index fc3c118..8ccfdb6 100644 --- a/lib/src/cognito_identity_id.dart +++ b/lib/src/cognito_identity_id.dart @@ -4,18 +4,18 @@ import 'client.dart'; import 'cognito_user_pool.dart'; class CognitoIdentityId { - String identityId; + String? identityId; final String _identityPoolId; final CognitoUserPool _pool; - final Client _client; - final String _region; + final Client? _client; + final String? _region; final String _identityIdKey; final String _authenticator; - final String _token; - Map _loginParam; + final String? _token; + Map? _loginParam; CognitoIdentityId(this._identityPoolId, this._pool, - {String authenticator, String token}) + {String? authenticator, String? token}) : _region = _pool.getRegion(), _client = _pool.client, _identityIdKey = 'aws.cognito.identity-id.$_identityPoolId', @@ -29,10 +29,10 @@ class CognitoIdentityId { } } - Map get loginParam => _loginParam; + Map? get loginParam => _loginParam; - Future getIdentityId() async { - String identityId = await _pool.storage.getItem(_identityIdKey); + Future getIdentityId() async { + String? identityId = await (_pool.storage!.getItem(_identityIdKey) as FutureOr); if (identityId != null) { this.identityId = identityId; return identityId; @@ -44,19 +44,19 @@ class CognitoIdentityId { paramsReq['Logins'] = _loginParam; } - final data = await _client.request('GetId', paramsReq, + final data = await _client!.request('GetId', paramsReq, service: 'AWSCognitoIdentityService', endpoint: 'https://cognito-identity.$_region.amazonaws.com/'); this.identityId = data['IdentityId']; - await _pool.storage.setItem(_identityIdKey, this.identityId); + await _pool.storage!.setItem(_identityIdKey, this.identityId); return this.identityId; } /// Remove AWS Identity Id from storage - Future removeIdentityId() async { + Future removeIdentityId() async { final identityIdKey = 'aws.cognito.identity-id.$_identityPoolId'; - return await _pool.storage.removeItem(identityIdKey); + return await (_pool.storage!.removeItem(identityIdKey) as FutureOr); } } diff --git a/lib/src/cognito_jwt_token.dart b/lib/src/cognito_jwt_token.dart index c9eb69e..3f6cbac 100644 --- a/lib/src/cognito_jwt_token.dart +++ b/lib/src/cognito_jwt_token.dart @@ -1,14 +1,14 @@ import 'dart:convert'; class CognitoJwtToken { - String jwtToken; + String? jwtToken; var payload; - CognitoJwtToken(String token) { + CognitoJwtToken(String? token) { jwtToken = token; payload = decodePayload(); } - String getJwtToken() { + String? getJwtToken() { return jwtToken; } @@ -21,7 +21,7 @@ class CognitoJwtToken { } dynamic decodePayload() { - var payload = jwtToken.split('.')[1]; + var payload = jwtToken!.split('.')[1]; if (payload.length % 4 > 0) { payload = payload.padRight(payload.length + (4 - payload.length % 4), '='); diff --git a/lib/src/cognito_refresh_token.dart b/lib/src/cognito_refresh_token.dart index 148f62e..dcd1636 100644 --- a/lib/src/cognito_refresh_token.dart +++ b/lib/src/cognito_refresh_token.dart @@ -1,10 +1,10 @@ class CognitoRefreshToken { - String token; - CognitoRefreshToken([String refreshToken = '']) { + String? token; + CognitoRefreshToken([String? refreshToken = '']) { token = refreshToken; } - String getToken() { + String? getToken() { return token; } } diff --git a/lib/src/cognito_user.dart b/lib/src/cognito_user.dart index e930b1c..1921f3a 100644 --- a/lib/src/cognito_user.dart +++ b/lib/src/cognito_user.dart @@ -19,8 +19,8 @@ import 'cognito_user_session.dart'; import 'date_helper.dart'; class CognitoUserAuthResult { - String challengeName; - String session; + String? challengeName; + String? session; dynamic authenticationResult; CognitoUserAuthResult({ this.challengeName, @@ -30,19 +30,19 @@ class CognitoUserAuthResult { } class CognitoUser { - String _deviceKey; - String _randomPassword; - String _deviceGroupKey; - String _session; - CognitoUserSession _signInUserSession; - String username; - String _clientSecretHash; + String? _deviceKey; + String? _randomPassword; + String? _deviceGroupKey; + String? _session; + CognitoUserSession? _signInUserSession; + String? username; + String? _clientSecretHash; CognitoUserPool pool; - Client client; - String authenticationFlowType; - String deviceName; - String verifierDevices; - CognitoStorage storage; + Client? client; + String? authenticationFlowType; + String? deviceName; + String? verifierDevices; + CognitoStorage? storage; CognitoUser( this.username, @@ -54,7 +54,7 @@ class CognitoUser { }) { if (clientSecret != null) { _clientSecretHash = - calculateClientSecretHash(username, pool.getClientId(), clientSecret); + calculateClientSecretHash(username!, pool.getClientId()!, clientSecret); } if (signInUserSession != null) { _signInUserSession = signInUserSession; @@ -66,9 +66,9 @@ class CognitoUser { storage ?? (CognitoStorageHelper(CognitoMemoryStorage())).getStorage(); } - Future _authenticateUserInternal( + Future _authenticateUserInternal( dataAuthenticate, AuthenticationHelper authenticationHelper) async { - final String challengeName = dataAuthenticate['ChallengeName']; + final String? challengeName = dataAuthenticate['ChallengeName']; var challengeParameters = dataAuthenticate['ChallengeParameters']; if (challengeName == 'SMS_MFA') { @@ -127,9 +127,9 @@ class CognitoUser { ); final deviceSecretVerifierConfig = { - 'Salt': base64.encode(hex.decode(authenticationHelper.getSaltDevices())), + 'Salt': base64.encode(hex.decode(authenticationHelper.getSaltDevices()!)), 'PasswordVerifier': - base64.encode(hex.decode(authenticationHelper.getVerifierDevices())) + base64.encode(hex.decode(authenticationHelper.getVerifierDevices()!)) }; verifierDevices = deviceSecretVerifierConfig['PasswordVerifier']; @@ -138,13 +138,13 @@ class CognitoUser { final paramsConfirmDevice = { 'DeviceKey': newDeviceMetadata['DeviceKey'], - 'AccessToken': _signInUserSession.getAccessToken().getJwtToken(), + 'AccessToken': _signInUserSession!.getAccessToken().getJwtToken(), 'DeviceSecretVerifierConfig': deviceSecretVerifierConfig, 'DeviceName': deviceName, }; final dataConfirm = - await client.request('ConfirmDevice', paramsConfirmDevice); + await client!.request('ConfirmDevice', paramsConfirmDevice); _deviceKey = dataAuthenticate['AuthenticationResult']['NewDeviceMetadata'] ['DeviceKey']; @@ -159,12 +159,12 @@ class CognitoUser { /// This is used to get a session, either from the session object /// or from the local storage, or by using a refresh token - Future getSession() async { + Future getSession() async { if (username == null) { throw Exception('Username is null. Cannot retrieve a new session'); } - if (_signInUserSession != null && _signInUserSession.isValid()) { + if (_signInUserSession != null && _signInUserSession!.isValid()) { return _signInUserSession; } @@ -175,13 +175,13 @@ class CognitoUser { final refreshTokenKey = '$keyPrefix.refreshToken'; final clockDriftKey = '$keyPrefix.clockDrift'; - if (await storage.getItem(idTokenKey) != null) { - final idToken = CognitoIdToken(await storage.getItem(idTokenKey)); + if (await storage!.getItem(idTokenKey) != null) { + final idToken = CognitoIdToken(await (storage!.getItem(idTokenKey) as FutureOr)); final accessToken = - CognitoAccessToken(await storage.getItem(accessTokenKey)); + CognitoAccessToken(await (storage!.getItem(accessTokenKey) as FutureOr)); final refreshToken = - CognitoRefreshToken(await storage.getItem(refreshTokenKey)); - final clockDrift = int.parse(await storage.getItem(clockDriftKey)) ?? 0; + CognitoRefreshToken(await (storage!.getItem(refreshTokenKey) as FutureOr)); + final clockDrift = int.parse(await (storage!.getItem(clockDriftKey) as FutureOr)) ?? 0; final cachedSession = CognitoUserSession( idToken, @@ -207,36 +207,36 @@ class CognitoUser { /// This is used to initiate an attribute confirmation request Future getAttributeVerificationCode(String attributeName) async { - if (_signInUserSession == null || !_signInUserSession.isValid()) { + if (_signInUserSession == null || !_signInUserSession!.isValid()) { throw Exception('User is not authenticated'); } final paramsReq = { 'AttributeName': attributeName, - 'AccessToken': _signInUserSession.getAccessToken().getJwtToken(), + 'AccessToken': _signInUserSession!.getAccessToken().getJwtToken(), }; - return await client.request('GetUserAttributeVerificationCode', paramsReq); + return await client!.request('GetUserAttributeVerificationCode', paramsReq); } /// This is used to confirm an attribute using a confirmation code Future verifyAttribute(attributeName, confirmationCode) async { - if (_signInUserSession == null || !_signInUserSession.isValid()) { + if (_signInUserSession == null || !_signInUserSession!.isValid()) { throw Exception('User is not authenticated'); } final paramsReq = { 'AttributeName': attributeName, 'Code': confirmationCode, - 'AccessToken': _signInUserSession.getAccessToken().getJwtToken(), + 'AccessToken': _signInUserSession!.getAccessToken().getJwtToken(), }; - await client.request('VerifyUserAttribute', paramsReq); + await client!.request('VerifyUserAttribute', paramsReq); return true; } /// This uses the refreshToken to retrieve a new session - Future refreshSession( + Future refreshSession( CognitoRefreshToken refreshToken) async { final authParameters = { 'REFRESH_TOKEN': refreshToken.getToken(), @@ -244,10 +244,10 @@ class CognitoUser { final keyPrefix = 'CognitoIdentityServiceProvider.${pool.getClientId()}'; final lastUserKey = '$keyPrefix.LastAuthUser'; - if (await storage.getItem(lastUserKey) != null) { - username = await storage.getItem(lastUserKey); + if (await storage!.getItem(lastUserKey) != null) { + username = await (storage!.getItem(lastUserKey) as FutureOr); final deviceKeyKey = '$keyPrefix.$username.deviceKey'; - _deviceKey = await storage.getItem(deviceKeyKey); + _deviceKey = await (storage!.getItem(deviceKeyKey) as FutureOr); authParameters['DEVICE_KEY'] = _deviceKey; if (_clientSecretHash != null) { authParameters['SECRET_HASH'] = _clientSecretHash; @@ -265,7 +265,7 @@ class CognitoUser { var authResult; try { - authResult = await client.request('InitiateAuth', paramsReq); + authResult = await client!.request('InitiateAuth', paramsReq); } on CognitoClientException catch (e) { if (e.code == 'NotAuthorizedException') { await clearCachedTokens(); @@ -285,15 +285,15 @@ class CognitoUser { return null; } - CognitoUserSession getSignInUserSession() { + CognitoUserSession? getSignInUserSession() { return _signInUserSession; } - String getUsername() { + String? getUsername() { return username; } - String getAuthenticationFlowType() { + String? getAuthenticationFlowType() { return authenticationFlowType; } @@ -309,10 +309,10 @@ class CognitoUser { final randomPasswordKey = '$keyPrefix.randomPasswordKey'; final deviceGroupKeyKey = '$keyPrefix.deviceGroupKey'; - if (await storage.getItem(deviceKeyKey) != null) { - _deviceKey = await storage.getItem(deviceKeyKey); - _deviceGroupKey = await storage.getItem(deviceGroupKeyKey); - _randomPassword = await storage.getItem(randomPasswordKey); + if (await storage!.getItem(deviceKeyKey) != null) { + _deviceKey = await (storage!.getItem(deviceKeyKey) as FutureOr); + _deviceGroupKey = await (storage!.getItem(deviceGroupKeyKey) as FutureOr); + _randomPassword = await (storage!.getItem(randomPasswordKey) as FutureOr); } } @@ -320,7 +320,7 @@ class CognitoUser { final keyPrefix = 'CognitoIdentityServiceProvider.${pool.getClientId()}.$username'; final userSessionKey = '$keyPrefix.userSessionKey'; - await storage.setItem(userSessionKey, _session); + await storage!.setItem(userSessionKey, _session); } void getCachedUserSession() async { @@ -328,13 +328,13 @@ class CognitoUser { 'CognitoIdentityServiceProvider.${pool.getClientId()}.$username'; final userSessionKey = '$keyPrefix.userSessionKey'; - if (await storage.getItem(userSessionKey) != null) { - _session = await storage.getItem(userSessionKey); + if (await storage!.getItem(userSessionKey) != null) { + _session = await (storage!.getItem(userSessionKey) as FutureOr); } } /// This returns the user context data for advanced security feature. - String getUserContextData() { + String? getUserContextData() { return pool.getUserContextData(username); } @@ -349,7 +349,7 @@ class CognitoUser { /// This is used to get a session using device authentication. It is called at the end of user /// authentication - Future getDeviceResponse() async { + Future getDeviceResponse() async { final authenticationHelper = AuthenticationHelper(_deviceGroupKey); final dateHelper = DateHelper(); @@ -357,7 +357,7 @@ class CognitoUser { 'USERNAME': username, 'DEVICE_KEY': _deviceKey, }; - final aValue = authenticationHelper.getLargeAValue(); + final aValue = authenticationHelper.getLargeAValue()!; authParameters['SRP_A'] = aValue.toRadixString(16); if (_clientSecretHash != null) { authParameters['SECRET_HASH'] = _clientSecretHash; @@ -373,7 +373,7 @@ class CognitoUser { params['UserContextData'] = getUserContextData(); } - final data = await client.request('RespondToAuthChallenge', params); + final data = await client!.request('RespondToAuthChallenge', params); final challengeParameters = data['ChallengeParameters']; final serverBValue = BigInt.parse(challengeParameters['SRP_B'], radix: 16); final saltString = @@ -388,8 +388,8 @@ class CognitoUser { final signature = Hmac(sha256, hkdf); final signatureData = []; signatureData - ..addAll(utf8.encode(_deviceGroupKey)) - ..addAll(utf8.encode(_deviceKey)) + ..addAll(utf8.encode(_deviceGroupKey!)) + ..addAll(utf8.encode(_deviceKey!)) ..addAll(base64.decode(challengeParameters['SECRET_BLOCK'])) ..addAll(utf8.encode(dateNow)); final dig = signature.convert(signatureData); @@ -419,7 +419,7 @@ class CognitoUser { } final dataAuthenticate = - await client.request('RespondToAuthChallenge', paramsResp); + await client!.request('RespondToAuthChallenge', paramsResp); _signInUserSession = getCognitoUserSession(dataAuthenticate['AuthenticationResult']); @@ -428,10 +428,10 @@ class CognitoUser { } /// This is used for authenticating the user through the custom authentication flow. - Future initiateAuth( + Future initiateAuth( AuthenticationDetails authDetails) async { final authParameters = - authDetails.getAuthParameters().fold({}, (value, element) { + authDetails.getAuthParameters()!.fold({}, (dynamic value, element) { value[element.name] = element.value; return value; }); @@ -452,9 +452,9 @@ class CognitoUser { paramsReq['UserContextData'] = getUserContextData(); } - final data = await client.request('InitiateAuth', paramsReq); + final data = await client!.request('InitiateAuth', paramsReq); - final String challengeName = data['ChallengeName']; + final String? challengeName = data['ChallengeName']; final challengeParameters = data['ChallengeParameters']; if (challengeName == 'CUSTOM_CHALLENGE') { _session = data['Session']; @@ -469,7 +469,7 @@ class CognitoUser { } /// This is used for authenticating the user. - Future authenticateUser( + Future authenticateUser( AuthenticationDetails authDetails) async { if (authenticationFlowType == 'USER_PASSWORD_AUTH') { return await _authenticateUserPlainUsernamePassword(authDetails); @@ -481,20 +481,20 @@ class CognitoUser { throw UnimplementedError('Authentication flow type is not supported.'); } - Future _authenticateUserCustomAuth( + Future _authenticateUserCustomAuth( AuthenticationDetails authDetails, ) async { final authenticationHelper = AuthenticationHelper( - pool.getUserPoolId().split('_')[1], + pool.getUserPoolId()!.split('_')[1], ); - Map authParameters = {}; + Map authParameters = {}; if (_deviceKey != null) { authParameters['DEVICE_KEY'] = _deviceKey; } authParameters['USERNAME'] = username; - final srpA = authenticationHelper.getLargeAValue(); + final srpA = authenticationHelper.getLargeAValue()!; authParameters['SRP_A'] = srpA.toRadixString(16); authParameters['CHALLENGE_NAME'] = 'SRP_A'; // Verifies username @@ -509,7 +509,7 @@ class CognitoUser { params['UserContextData'] = getUserContextData(); } - final authResult = await client.request('InitiateAuth', params); + final authResult = await client!.request('InitiateAuth', params); return _authenticateUserInternal(authResult, authenticationHelper); } @@ -522,17 +522,17 @@ class CognitoUser { /// This is used to globally revoke all tokens issued to a user Future globalSignOut() async { - if (_signInUserSession == null || !_signInUserSession.isValid()) { + if (_signInUserSession == null || !_signInUserSession!.isValid()) { throw Exception('User is not authenticated'); } final paramsReq = { - 'AccessToken': _signInUserSession.getAccessToken().getJwtToken(), + 'AccessToken': _signInUserSession!.getAccessToken().getJwtToken(), }; - await client.request('GlobalSignOut', paramsReq); + await client!.request('GlobalSignOut', paramsReq); await clearCachedTokens(); } - Future _authenticateUserPlainUsernamePassword( + Future _authenticateUserPlainUsernamePassword( AuthenticationDetails authDetails) async { final authParameters = { 'USERNAME': username, @@ -543,7 +543,7 @@ class CognitoUser { } final authenticationHelper = AuthenticationHelper( - pool.getUserPoolId().split('_')[1], + pool.getUserPoolId()!.split('_')[1], ); getCachedDeviceKeyAndPassword(); @@ -561,16 +561,16 @@ class CognitoUser { if (getUserContextData() != null) { paramsReq['UserContextData'] = getUserContextData(); } - final authResult = await client.request('InitiateAuth', paramsReq); + final authResult = await client!.request('InitiateAuth', paramsReq); return _authenticateUserInternal(authResult, authenticationHelper); } - Future _authenticateUserDefaultAuth( + Future _authenticateUserDefaultAuth( AuthenticationDetails authDetails, ) async { final authenticationHelper = AuthenticationHelper( - pool.getUserPoolId().split('_')[1], + pool.getUserPoolId()!.split('_')[1], ); final dateHelper = DateHelper(); BigInt serverBValue; @@ -584,7 +584,7 @@ class CognitoUser { } authParameters['USERNAME'] = username; - final srpA = authenticationHelper.getLargeAValue(); + final srpA = authenticationHelper.getLargeAValue()!; authParameters['SRP_A'] = srpA.toRadixString(16); if (authenticationFlowType == 'CUSTOM_AUTH') { @@ -608,7 +608,7 @@ class CognitoUser { var data; try { - data = await client.request('InitiateAuth', params); + data = await client!.request('InitiateAuth', params); } on CognitoClientException catch (e) { if (e.name == 'UserNotConfirmedException') { throw CognitoUserConfirmationNecessaryException(); @@ -639,8 +639,8 @@ class CognitoUser { final signature = Hmac(sha256, hkdf); final signatureData = []; signatureData - ..addAll(utf8.encode(pool.getUserPoolId().split('_')[1])) - ..addAll(utf8.encode(username)) + ..addAll(utf8.encode(pool.getUserPoolId()!.split('_')[1])) + ..addAll(utf8.encode(username!)) ..addAll(base64.decode(challengeParameters['SECRET_BLOCK'])) ..addAll(utf8.encode(dateNow)); final dig = signature.convert(signatureData); @@ -665,10 +665,10 @@ class CognitoUser { var dataChallenge; try { dataChallenge = - await client.request('RespondToAuthChallenge', challenge); + await client!.request('RespondToAuthChallenge', challenge); } on CognitoClientException catch (e) { if (e.code == 'ResourceNotFoundException' && - e.message.toLowerCase().contains('device')) { + e.message!.toLowerCase().contains('device')) { challengeResponses['DEVICE_KEY'] = null; _deviceKey = null; _randomPassword = null; @@ -751,7 +751,7 @@ class CognitoUser { params['UserContextData'] = getUserContextData(); } - await client.request('ConfirmSignUp', params); + await client!.request('ConfirmSignUp', params); return true; } @@ -761,13 +761,13 @@ class CognitoUser { 'ClientId': pool.getClientId(), 'Username': username, }; - var data = await client.request('ResendConfirmationCode', params); + var data = await client!.request('ResendConfirmationCode', params); return data; } /// This is used by the user once he has the responses to a custom challenge - Future sendCustomChallengeAnswer( + Future sendCustomChallengeAnswer( String answerChallenge) async { final challengeResponses = { 'USERNAME': username, @@ -775,7 +775,7 @@ class CognitoUser { }; final authenticationHelper = - AuthenticationHelper(pool.getUserPoolId().split('_')[1]); + AuthenticationHelper(pool.getUserPoolId()!.split('_')[1]); await getCachedUserSession(); if (_deviceKey != null) { @@ -797,7 +797,7 @@ class CognitoUser { paramsReq['UserContextData'] = getUserContextData(); } - final data = await client.request('RespondToAuthChallenge', paramsReq); + final data = await client!.request('RespondToAuthChallenge', paramsReq); return _authenticateUserInternal(data, authenticationHelper); } @@ -807,8 +807,8 @@ class CognitoUser { /// Its allow set a new user password and optionally set new user attributes. /// Attributes can be send in the *requiredAttributes* map where a map key is an attribute /// name and a map value is an attribute value. - Future sendNewPasswordRequiredAnswer(String newPassword, - [Map requiredAttributes]) async { + Future sendNewPasswordRequiredAnswer(String newPassword, + [Map? requiredAttributes]) async { final challengeResponses = { 'USERNAME': username, 'NEW_PASSWORD': newPassword, @@ -821,7 +821,7 @@ class CognitoUser { } final authenticationHelper = - AuthenticationHelper(pool.getUserPoolId().split('_')[1]); + AuthenticationHelper(pool.getUserPoolId()!.split('_')[1]); getCachedDeviceKeyAndPassword(); if (_deviceKey != null) { @@ -839,13 +839,13 @@ class CognitoUser { paramsReq['UserContextData'] = getUserContextData(); } - final data = await client.request('RespondToAuthChallenge', paramsReq); + final data = await client!.request('RespondToAuthChallenge', paramsReq); return _authenticateUserInternal(data, authenticationHelper); } /// This is used by the user once he has an MFA code - Future sendMFACode(String confirmationCode, + Future sendMFACode(String confirmationCode, [String mfaType = 'SMS_MFA']) async { final challengeResponses = { 'USERNAME': username, @@ -871,9 +871,9 @@ class CognitoUser { } final dataAuthenticate = - await client.request('RespondToAuthChallenge', paramsReq); + await client!.request('RespondToAuthChallenge', paramsReq); - final String challengeName = dataAuthenticate['ChallengeName']; + final String? challengeName = dataAuthenticate['ChallengeName']; if (challengeName == 'DEVICE_SRP_AUTH') { return getDeviceResponse(); @@ -888,7 +888,7 @@ class CognitoUser { } final authenticationHelper = - AuthenticationHelper(pool.getUserPoolId().split('_')[1]); + AuthenticationHelper(pool.getUserPoolId()!.split('_')[1]); authenticationHelper.generateHashDevice( dataAuthenticate['AuthenticationResult']['NewDeviceMetadata'] ['DeviceGroupKey'], @@ -896,9 +896,9 @@ class CognitoUser { ['DeviceKey']); final deviceSecretVerifierConfig = { - 'Salt': base64.encode(hex.decode(authenticationHelper.getSaltDevices())), + 'Salt': base64.encode(hex.decode(authenticationHelper.getSaltDevices()!)), 'PasswordVerifier': - base64.encode(hex.decode(authenticationHelper.getVerifierDevices())), + base64.encode(hex.decode(authenticationHelper.getVerifierDevices()!)), }; verifierDevices = deviceSecretVerifierConfig['PasswordVerifier']; @@ -909,12 +909,12 @@ class CognitoUser { final confirmDeviceParamsReq = { 'DeviceKey': dataAuthenticate['AuthenticationResult']['NewDeviceMetadata'] ['DeviceKey'], - 'AccessToken': _signInUserSession.getAccessToken().getJwtToken(), + 'AccessToken': _signInUserSession!.getAccessToken().getJwtToken(), 'DeviceSecretVerifierConfig': deviceSecretVerifierConfig, 'DeviceName': deviceName, }; final dataConfirm = - await client.request('ConfirmDevice', confirmDeviceParamsReq); + await client!.request('ConfirmDevice', confirmDeviceParamsReq); _deviceKey = dataAuthenticate['AuthenticationResult']['NewDeviceMetadata'] ['DeviceKey']; await cacheDeviceKeyAndPassword(); @@ -929,26 +929,26 @@ class CognitoUser { /// This is used by an authenticated user to change the current password Future changePassword( String oldUserPassword, String newUserPassword) async { - if (!(_signInUserSession != null && _signInUserSession.isValid())) { + if (!(_signInUserSession != null && _signInUserSession!.isValid())) { throw Exception('User is not authenticated'); } final paramsReq = { 'PreviousPassword': oldUserPassword, 'ProposedPassword': newUserPassword, - 'AccessToken': _signInUserSession.getAccessToken().getJwtToken(), + 'AccessToken': _signInUserSession!.getAccessToken().getJwtToken(), }; if (_clientSecretHash != null) { paramsReq['SecretHash'] = _clientSecretHash; } - await client.request('ChangePassword', paramsReq); + await client!.request('ChangePassword', paramsReq); return true; } /// This is used by authenticated users to enable MFA for him/herself Future enableMfa() async { - if (_signInUserSession == null || !_signInUserSession.isValid()) { + if (_signInUserSession == null || !_signInUserSession!.isValid()) { throw Exception('User is not authenticated'); } @@ -961,16 +961,16 @@ class CognitoUser { final paramsReq = { 'MFAOptions': mfaOptions, - 'AccessToken': _signInUserSession.getAccessToken().getJwtToken(), + 'AccessToken': _signInUserSession!.getAccessToken().getJwtToken(), }; - await client.request('SetUserSettings', paramsReq); + await client!.request('SetUserSettings', paramsReq); return true; } /// This is used by an authenticated user to disable MFA for him/herself Future disableMfa() async { - if (_signInUserSession == null || !_signInUserSession.isValid()) { + if (_signInUserSession == null || !_signInUserSession!.isValid()) { throw Exception('User is not authenticated'); } @@ -978,10 +978,10 @@ class CognitoUser { final paramsReq = { 'MFAOptions': mfaOptions, - 'AccessToken': _signInUserSession.getAccessToken().getJwtToken(), + 'AccessToken': _signInUserSession!.getAccessToken().getJwtToken(), }; - await client.request('SetUserSettings', paramsReq); + await client!.request('SetUserSettings', paramsReq); return true; } @@ -998,7 +998,7 @@ class CognitoUser { paramsReq['UserContextData'] = getUserContextData(); } - return await client.request('ForgotPassword', paramsReq); + return await client!.request('ForgotPassword', paramsReq); } /// This is used to confirm a new password using a confirmation code @@ -1017,7 +1017,7 @@ class CognitoUser { paramsReq['UserContextData'] = getUserContextData(); } - await client.request('ConfirmForgotPassword', paramsReq); + await client!.request('ConfirmForgotPassword', paramsReq); return true; } @@ -1031,14 +1031,14 @@ class CognitoUser { final lastUserKey = '$keyPrefix.LastAuthUser'; await Future.wait([ - storage.setItem( - idTokenKey, _signInUserSession.getIdToken().getJwtToken()), - storage.setItem( - accessTokenKey, _signInUserSession.getAccessToken().getJwtToken()), - storage.setItem( - refreshTokenKey, _signInUserSession.getRefreshToken().getToken()), - storage.setItem(clockDriftKey, '${_signInUserSession.getClockDrift()}'), - storage.setItem(lastUserKey, username), + storage!.setItem( + idTokenKey, _signInUserSession!.getIdToken().getJwtToken()), + storage!.setItem( + accessTokenKey, _signInUserSession!.getAccessToken().getJwtToken()), + storage!.setItem( + refreshTokenKey, _signInUserSession!.getRefreshToken()!.getToken()), + storage!.setItem(clockDriftKey, '${_signInUserSession!.getClockDrift()}'), + storage!.setItem(lastUserKey, username), ]); } @@ -1051,10 +1051,10 @@ class CognitoUser { final lastUserKey = '$keyPrefix.LastAuthUser'; await Future.wait([ - storage.removeItem(idTokenKey), - storage.removeItem(accessTokenKey), - storage.removeItem(refreshTokenKey), - storage.removeItem(lastUserKey), + storage!.removeItem(idTokenKey), + storage!.removeItem(accessTokenKey), + storage!.removeItem(refreshTokenKey), + storage!.removeItem(lastUserKey), ]); } @@ -1067,9 +1067,9 @@ class CognitoUser { final deviceGroupKeyKey = '$keyPrefix.deviceGroupKey'; await Future.wait([ - storage.setItem(deviceKeyKey, _deviceKey), - storage.setItem(randomPasswordKey, _randomPassword), - storage.setItem(deviceGroupKeyKey, _deviceGroupKey), + storage!.setItem(deviceKeyKey, _deviceKey), + storage!.setItem(randomPasswordKey, _randomPassword), + storage!.setItem(deviceGroupKeyKey, _deviceGroupKey), ]); } @@ -1082,22 +1082,22 @@ class CognitoUser { final deviceGroupKeyKey = '$keyPrefix.deviceGroupKey'; await Future.wait([ - storage.removeItem(deviceKeyKey), - storage.removeItem(randomPasswordKey), - storage.removeItem(deviceGroupKeyKey), + storage!.removeItem(deviceKeyKey), + storage!.removeItem(randomPasswordKey), + storage!.removeItem(deviceGroupKeyKey), ]); } /// This is used by authenticated users to get a list of attributes - Future> getUserAttributes() async { - if (!(_signInUserSession != null && _signInUserSession.isValid())) { + Future?> getUserAttributes() async { + if (!(_signInUserSession != null && _signInUserSession!.isValid())) { throw Exception('User is not authenticated'); } final paramsReq = { - 'AccessToken': _signInUserSession.getAccessToken().getJwtToken(), + 'AccessToken': _signInUserSession!.getAccessToken().getJwtToken(), }; - final userData = await client.request('GetUser', paramsReq); + final userData = await client!.request('GetUser', paramsReq); if (userData['UserAttributes'] == null) { return null; @@ -1113,40 +1113,40 @@ class CognitoUser { /// This is used by authenticated users to change a list of attributes void updateAttributes(List attributes) async { - if (_signInUserSession == null || !_signInUserSession.isValid()) { + if (_signInUserSession == null || !_signInUserSession!.isValid()) { throw Exception('User is not authenticated'); } final paramsReq = { - 'AccessToken': _signInUserSession.getAccessToken().getJwtToken(), + 'AccessToken': _signInUserSession!.getAccessToken().getJwtToken(), 'UserAttributes': attributes, }; - await client.request('UpdateUserAttributes', paramsReq); + await client!.request('UpdateUserAttributes', paramsReq); } /// This is used by an authenticated user to delete a list of attributes void deleteAttributes(List attributeList) async { - if (!(_signInUserSession != null && _signInUserSession.isValid())) { + if (!(_signInUserSession != null && _signInUserSession!.isValid())) { throw Exception('User is not authenticated'); } final paramsReq = { - 'AccessToken': _signInUserSession.getAccessToken().getJwtToken(), + 'AccessToken': _signInUserSession!.getAccessToken().getJwtToken(), 'UserAttributeNames': attributeList, }; - await client.request('DeleteUserAttributes', paramsReq); + await client!.request('DeleteUserAttributes', paramsReq); } /// This is used by an authenticated user to delete him/herself Future deleteUser() async { - if (_signInUserSession == null || !_signInUserSession.isValid()) { + if (_signInUserSession == null || !_signInUserSession!.isValid()) { throw Exception('User is not authenticated'); } final paramsReq = { - 'AccessToken': _signInUserSession.getAccessToken().getJwtToken(), + 'AccessToken': _signInUserSession!.getAccessToken().getJwtToken(), }; - await client.request('DeleteUser', paramsReq); + await client!.request('DeleteUser', paramsReq); await clearCachedTokens(); return true; diff --git a/lib/src/cognito_user_attribute.dart b/lib/src/cognito_user_attribute.dart index 76e2058..c000147 100644 --- a/lib/src/cognito_user_attribute.dart +++ b/lib/src/cognito_user_attribute.dart @@ -1,12 +1,12 @@ import 'dart:convert'; class CognitoUserAttribute { - String name; - String value; + String? name; + String? value; CognitoUserAttribute({this.name, this.value}); - String getValue() { + String? getValue() { return value; } @@ -15,7 +15,7 @@ class CognitoUserAttribute { return this; } - String getName() { + String? getName() { return name; } @@ -31,7 +31,7 @@ class CognitoUserAttribute { return encoded.toString(); } - Map toJson() { + Map toJson() { return { 'Name': name, 'Value': value, diff --git a/lib/src/cognito_user_exceptions.dart b/lib/src/cognito_user_exceptions.dart index 9fd85cd..86dc8cb 100644 --- a/lib/src/cognito_user_exceptions.dart +++ b/lib/src/cognito_user_exceptions.dart @@ -1,8 +1,8 @@ import 'cognito_user_session.dart'; class CognitoUserException implements Exception { - String message; - String challengeName; + String? message; + String? challengeName; CognitoUserException([this.message]); @override @@ -17,9 +17,9 @@ class CognitoUserException implements Exception { class CognitoUserNewPasswordRequiredException extends CognitoUserException { @override - String message; + String? message; dynamic userAttributes; - List requiredAttributes; + List? requiredAttributes; CognitoUserNewPasswordRequiredException( {this.userAttributes, this.requiredAttributes, @@ -28,9 +28,9 @@ class CognitoUserNewPasswordRequiredException extends CognitoUserException { class CognitoUserMfaRequiredException extends CognitoUserException { @override - String message; + String? message; @override - String challengeName; + String? challengeName; dynamic challengeParameters; CognitoUserMfaRequiredException( {this.challengeName = 'SMS_MFA', this.challengeParameters, this.message}); @@ -38,9 +38,9 @@ class CognitoUserMfaRequiredException extends CognitoUserException { class CognitoUserSelectMfaTypeException extends CognitoUserException { @override - String message; + String? message; @override - String challengeName; + String? challengeName; dynamic challengeParameters; CognitoUserSelectMfaTypeException( {this.challengeName = 'SELECT_MFA_TYPE', @@ -50,9 +50,9 @@ class CognitoUserSelectMfaTypeException extends CognitoUserException { class CognitoUserMfaSetupException extends CognitoUserException { @override - String message; + String? message; @override - String challengeName; + String? challengeName; dynamic challengeParameters; CognitoUserMfaSetupException( {this.challengeName = 'MFA_SETUP', @@ -62,9 +62,9 @@ class CognitoUserMfaSetupException extends CognitoUserException { class CognitoUserTotpRequiredException extends CognitoUserException { @override - String message; + String? message; @override - String challengeName; + String? challengeName; dynamic challengeParameters; CognitoUserTotpRequiredException( {this.challengeName = 'SOFTWARE_TOKEN_MFA', @@ -74,9 +74,9 @@ class CognitoUserTotpRequiredException extends CognitoUserException { class CognitoUserCustomChallengeException extends CognitoUserException { @override - String message; + String? message; @override - String challengeName; + String? challengeName; dynamic challengeParameters; CognitoUserCustomChallengeException( {this.challengeName = 'CUSTOM_CHALLENGE', @@ -86,8 +86,8 @@ class CognitoUserCustomChallengeException extends CognitoUserException { class CognitoUserConfirmationNecessaryException extends CognitoUserException { @override - String message; - CognitoUserSession signInUserSession; + String? message; + CognitoUserSession? signInUserSession; CognitoUserConfirmationNecessaryException( {this.signInUserSession, this.message = 'User Confirmation Necessary'}); } diff --git a/lib/src/cognito_user_pool.dart b/lib/src/cognito_user_pool.dart index 8580859..d2cac41 100644 --- a/lib/src/cognito_user_pool.dart +++ b/lib/src/cognito_user_pool.dart @@ -7,8 +7,8 @@ import 'cognito_user.dart'; class CognitoUserPoolData { CognitoUser user; - bool userConfirmed; - String userSub; + bool? userConfirmed; + String? userSub; CognitoUserPoolData(this.user, {this.userConfirmed, this.userSub}); factory CognitoUserPoolData.fromData( @@ -22,22 +22,22 @@ class CognitoUserPoolData { } class CognitoUserPool { - String _userPoolId; - String _clientId; - String _clientSecret; - String _region; + String? _userPoolId; + String? _clientId; + String? _clientSecret; + String? _region; bool advancedSecurityDataCollectionFlag; - Client client; - CognitoStorage storage; - String _userAgent; + Client? client; + CognitoStorage? storage; + String? _userAgent; CognitoUserPool( String userPoolId, String clientId, { - String clientSecret, - String endpoint, - Client customClient, - String customUserAgent, + String? clientSecret, + String? endpoint, + Client? customClient, + String? customUserAgent, this.storage, this.advancedSecurityDataCollectionFlag = true, }) { @@ -60,23 +60,23 @@ class CognitoUserPool { storage ?? (CognitoStorageHelper(CognitoMemoryStorage())).getStorage(); } - String getUserPoolId() { + String? getUserPoolId() { return _userPoolId; } - String getClientId() { + String? getClientId() { return _clientId; } - String getRegion() { + String? getRegion() { return _region; } - Future getCurrentUser() async { + Future getCurrentUser() async { final lastUserKey = 'CognitoIdentityServiceProvider.$_clientId.LastAuthUser'; - final lastAuthUser = await storage.getItem(lastUserKey); + final lastAuthUser = await storage!.getItem(lastUserKey); if (lastAuthUser != null) { return CognitoUser(lastAuthUser, this, storage: storage, @@ -92,7 +92,7 @@ class CognitoUserPool { /// data on their client. Please refer to documentation to know more about using AdvancedSecurity /// features /// TODO: not supported at the moment - String getUserContextData(String username) { + String? getUserContextData(String? username) { return null; } @@ -101,8 +101,8 @@ class CognitoUserPool { Future signUp( String username, String password, { - List userAttributes, - List validationData, + List? userAttributes, + List? validationData, }) async { final params = { 'ClientId': _clientId, @@ -114,10 +114,10 @@ class CognitoUserPool { if (_clientSecret != null) { params['SecretHash'] = CognitoUser.calculateClientSecretHash( - username, _clientId, _clientSecret); + username, _clientId!, _clientSecret!); } - final data = await client.request('SignUp', params); + final data = await client!.request('SignUp', params); if (data == null) { return null; } diff --git a/lib/src/cognito_user_session.dart b/lib/src/cognito_user_session.dart index 7a69b32..5b7028f 100644 --- a/lib/src/cognito_user_session.dart +++ b/lib/src/cognito_user_session.dart @@ -6,16 +6,16 @@ import 'cognito_refresh_token.dart'; class CognitoUserSession { CognitoIdToken idToken; - CognitoRefreshToken refreshToken; + CognitoRefreshToken? refreshToken; CognitoAccessToken accessToken; - int clockDrift; + int? clockDrift; bool _invalidated = false; CognitoUserSession( this.idToken, this.accessToken, { this.refreshToken, - int clockDrift, + int? clockDrift, }) { this.clockDrift = clockDrift ?? calculateClockDrift(); } @@ -26,7 +26,7 @@ class CognitoUserSession { } /// Get the session's refresh token - CognitoRefreshToken getRefreshToken() { + CognitoRefreshToken? getRefreshToken() { return refreshToken; } @@ -36,7 +36,7 @@ class CognitoUserSession { } /// Get the session's clock drift - int getClockDrift() { + int? getClockDrift() { return clockDrift; } @@ -60,7 +60,7 @@ class CognitoUserSession { return false; } final now = (DateTime.now().millisecondsSinceEpoch / 1000).floor(); - final adjusted = now - clockDrift; + final adjusted = now - clockDrift!; return adjusted < accessToken.getExpiration() && adjusted < idToken.getExpiration(); diff --git a/lib/src/random_string_helper.dart b/lib/src/random_string_helper.dart index 6bfe54d..78d3a61 100644 --- a/lib/src/random_string_helper.dart +++ b/lib/src/random_string_helper.dart @@ -22,7 +22,7 @@ const List _hexCharList = [ class RandomString { final Random _random; - RandomString({bool secure = true, int seed}) + RandomString({bool secure = true, int? seed}) : _random = (secure ? Random.secure() : (seed == null ? Random() : Random(seed))); diff --git a/test/authentication_helper_test.dart b/test/authentication_helper_test.dart index d8e7a9e..32d7554 100644 --- a/test/authentication_helper_test.dart +++ b/test/authentication_helper_test.dart @@ -34,7 +34,7 @@ void main() { test('.generateHashDevice() generates verifierDevices', () { final h = AuthenticationHelper('pool_name'); h.generateHashDevice('macbook:key', 'see.saw@email.com'); - expect(h.getVerifierDevices().length, anyOf([766, 768, 770])); + expect(h.getVerifierDevices()!.length, anyOf([766, 768, 770])); }); test('.padHex() with odd length pads left', () { final h = AuthenticationHelper('pool_name'); diff --git a/test/cognito_user_pool_test.dart b/test/cognito_user_pool_test.dart index 4e5517c..09f2335 100644 --- a/test/cognito_user_pool_test.dart +++ b/test/cognito_user_pool_test.dart @@ -28,7 +28,7 @@ void main() { final cup = CognitoUserPool( 'ap-southeast-1_nnnnnnnnn', 'nnnnnnnnnnnnnnnnnnnnnnnnnn'); expect( - cup.client.endpoint, + cup.client!.endpoint, equals('https://cognito-idp.ap-southeast-1.amazonaws.com/'), ); }); @@ -54,7 +54,7 @@ void main() { customClient: c, ); final Map data = - await cup.client.request('TestOperation', { + await cup.client!.request('TestOperation', { 'color': 'Green', }); expect(data['it'], equals('works')); diff --git a/test/sig_v4_helper_test.dart b/test/sig_v4_helper_test.dart index d60d251..b0a72e6 100644 --- a/test/sig_v4_helper_test.dart +++ b/test/sig_v4_helper_test.dart @@ -176,7 +176,7 @@ void main() { expect( signedRequest.url, equals('$endpoint/projects/123?color=orange%20red')); expect( - signedRequest.headers['Authorization'], + signedRequest.headers!['Authorization'], equals('AWS4-HMAC-SHA256 ' 'Credential=AXXXXXXXXXXXXXXXXXXX/20180515/ap-southeast-1/execute-api/aws4_request, ' 'SignedHeaders=accept;content-type;header-1;header-2;host;x-amz-date, ' diff --git a/test/test_storage.dart b/test/test_storage.dart index 2a872fd..7e3d1a5 100644 --- a/test/test_storage.dart +++ b/test/test_storage.dart @@ -8,7 +8,7 @@ class TestCustomStorage extends CognitoStorage { String prefix; TestCustomStorage(this.prefix); @override - Future setItem(String key, value) async { + Future setItem(String key, value) async { testStorage[prefix + key] = json.encode(value); return testStorage[prefix + key]; } @@ -16,13 +16,13 @@ class TestCustomStorage extends CognitoStorage { @override Future getItem(String key) async { if (testStorage[prefix + key] != null) { - return json.decode(testStorage[prefix + key]); + return json.decode(testStorage[prefix + key]!); } return null; } @override - Future removeItem(String key) async { + Future removeItem(String key) async { return testStorage.remove(prefix + key); } From 7ac747d865aeba6a4d9950f528f23394fcf27f56 Mon Sep 17 00:00:00 2001 From: Paulo Henrique Nonaka Date: Mon, 22 Mar 2021 15:02:03 -0300 Subject: [PATCH 5/6] remove example and tests since we do not maintain this lib --- example/.flutter-plugins-dependencies | 1 - example/.gitignore | 13 - example/.metadata | 8 - example/README.md | 38 - example/android/.gitignore | 10 - example/android/.project | 17 - .../org.eclipse.buildship.core.prefs | 2 - example/android/app/.classpath | 6 - example/android/app/.project | 23 - .../org.eclipse.buildship.core.prefs | 2 - example/android/app/build.gradle | 51 - .../android/app/src/main/AndroidManifest.xml | 39 - .../example/securecounter/MainActivity.java | 14 - .../main/res/drawable/launch_background.xml | 12 - .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 544 -> 0 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 442 -> 0 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 721 -> 0 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 1031 -> 0 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 1443 -> 0 bytes .../app/src/main/res/values/styles.xml | 8 - example/android/build.gradle | 29 - example/android/gradle.properties | 1 - .../android/gradle/wrapper/gradle-wrapper.jar | Bin 53636 -> 0 bytes .../gradle/wrapper/gradle-wrapper.properties | 6 - example/android/gradlew | 160 ---- example/android/gradlew.bat | 90 -- example/android/settings.gradle | 15 - example/ios/.gitignore | 45 - example/ios/Flutter/AppFrameworkInfo.plist | 30 - example/ios/Flutter/Debug.xcconfig | 2 - example/ios/Flutter/Release.xcconfig | 2 - example/ios/Podfile | 63 -- example/ios/Podfile.lock | 22 - example/ios/Runner.xcodeproj/project.pbxproj | 497 ---------- .../contents.xcworkspacedata | 7 - .../xcshareddata/xcschemes/Runner.xcscheme | 93 -- .../contents.xcworkspacedata | 10 - .../xcshareddata/WorkspaceSettings.xcsettings | 8 - example/ios/Runner/AppDelegate.h | 6 - example/ios/Runner/AppDelegate.m | 12 - .../AppIcon.appiconset/Contents.json | 122 --- .../Icon-App-1024x1024@1x.png | Bin 11112 -> 0 bytes .../AppIcon.appiconset/Icon-App-20x20@1x.png | Bin 564 -> 0 bytes .../AppIcon.appiconset/Icon-App-20x20@2x.png | Bin 1283 -> 0 bytes .../AppIcon.appiconset/Icon-App-20x20@3x.png | Bin 1588 -> 0 bytes .../AppIcon.appiconset/Icon-App-29x29@1x.png | Bin 1025 -> 0 bytes .../AppIcon.appiconset/Icon-App-29x29@2x.png | Bin 1716 -> 0 bytes .../AppIcon.appiconset/Icon-App-29x29@3x.png | Bin 1920 -> 0 bytes .../AppIcon.appiconset/Icon-App-40x40@1x.png | Bin 1283 -> 0 bytes .../AppIcon.appiconset/Icon-App-40x40@2x.png | Bin 1895 -> 0 bytes .../AppIcon.appiconset/Icon-App-40x40@3x.png | Bin 2665 -> 0 bytes .../AppIcon.appiconset/Icon-App-60x60@2x.png | Bin 2665 -> 0 bytes .../AppIcon.appiconset/Icon-App-60x60@3x.png | Bin 3831 -> 0 bytes .../AppIcon.appiconset/Icon-App-76x76@1x.png | Bin 1888 -> 0 bytes .../AppIcon.appiconset/Icon-App-76x76@2x.png | Bin 3294 -> 0 bytes .../Icon-App-83.5x83.5@2x.png | Bin 3612 -> 0 bytes .../LaunchImage.imageset/Contents.json | 23 - .../LaunchImage.imageset/LaunchImage.png | Bin 68 -> 0 bytes .../LaunchImage.imageset/LaunchImage@2x.png | Bin 68 -> 0 bytes .../LaunchImage.imageset/LaunchImage@3x.png | Bin 68 -> 0 bytes .../LaunchImage.imageset/README.md | 5 - .../Runner/Base.lproj/LaunchScreen.storyboard | 37 - example/ios/Runner/Base.lproj/Main.storyboard | 26 - example/ios/Runner/Info.plist | 49 - example/ios/Runner/main.m | 9 - example/lib/main.dart | 898 ------------------ example/pubspec.yaml | 20 - example/secure_counter.iml | 18 - example/secure_counter_android.iml | 27 - test/authentication_helper_test.dart | 90 -- test/client_test.dart | 147 --- test/cognito_id_token_test.dart | 28 - test/cognito_jwt_token_test.dart | 37 - test/cognito_user_attribute_test.dart | 36 - test/cognito_user_exceptions_test.dart | 140 --- test/cognito_user_pool_test.dart | 113 --- test/date_helper_test.dart | 42 - test/random_string_helper_test.dart | 11 - test/sig_v4_helper_test.dart | 185 ---- test/storage_helper_test.dart | 61 -- test/test_storage.dart | 33 - 81 files changed, 3499 deletions(-) delete mode 100644 example/.flutter-plugins-dependencies delete mode 100644 example/.gitignore delete mode 100644 example/.metadata delete mode 100644 example/README.md delete mode 100644 example/android/.gitignore delete mode 100644 example/android/.project delete mode 100644 example/android/.settings/org.eclipse.buildship.core.prefs delete mode 100644 example/android/app/.classpath delete mode 100644 example/android/app/.project delete mode 100644 example/android/app/.settings/org.eclipse.buildship.core.prefs delete mode 100644 example/android/app/build.gradle delete mode 100644 example/android/app/src/main/AndroidManifest.xml delete mode 100644 example/android/app/src/main/java/com/example/securecounter/MainActivity.java delete mode 100644 example/android/app/src/main/res/drawable/launch_background.xml delete mode 100644 example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png delete mode 100644 example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png delete mode 100644 example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png delete mode 100644 example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png delete mode 100644 example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png delete mode 100644 example/android/app/src/main/res/values/styles.xml delete mode 100644 example/android/build.gradle delete mode 100644 example/android/gradle.properties delete mode 100644 example/android/gradle/wrapper/gradle-wrapper.jar delete mode 100644 example/android/gradle/wrapper/gradle-wrapper.properties delete mode 100755 example/android/gradlew delete mode 100644 example/android/gradlew.bat delete mode 100644 example/android/settings.gradle delete mode 100644 example/ios/.gitignore delete mode 100644 example/ios/Flutter/AppFrameworkInfo.plist delete mode 100644 example/ios/Flutter/Debug.xcconfig delete mode 100644 example/ios/Flutter/Release.xcconfig delete mode 100644 example/ios/Podfile delete mode 100644 example/ios/Podfile.lock delete mode 100644 example/ios/Runner.xcodeproj/project.pbxproj delete mode 100644 example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme delete mode 100644 example/ios/Runner.xcworkspace/contents.xcworkspacedata delete mode 100644 example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings delete mode 100644 example/ios/Runner/AppDelegate.h delete mode 100644 example/ios/Runner/AppDelegate.m delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png delete mode 100644 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png delete mode 100644 example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json delete mode 100644 example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png delete mode 100644 example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png delete mode 100644 example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png delete mode 100644 example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md delete mode 100644 example/ios/Runner/Base.lproj/LaunchScreen.storyboard delete mode 100644 example/ios/Runner/Base.lproj/Main.storyboard delete mode 100644 example/ios/Runner/Info.plist delete mode 100644 example/ios/Runner/main.m delete mode 100644 example/lib/main.dart delete mode 100644 example/pubspec.yaml delete mode 100644 example/secure_counter.iml delete mode 100644 example/secure_counter_android.iml delete mode 100644 test/authentication_helper_test.dart delete mode 100644 test/client_test.dart delete mode 100644 test/cognito_id_token_test.dart delete mode 100644 test/cognito_jwt_token_test.dart delete mode 100644 test/cognito_user_attribute_test.dart delete mode 100644 test/cognito_user_exceptions_test.dart delete mode 100644 test/cognito_user_pool_test.dart delete mode 100644 test/date_helper_test.dart delete mode 100644 test/random_string_helper_test.dart delete mode 100644 test/sig_v4_helper_test.dart delete mode 100644 test/storage_helper_test.dart delete mode 100644 test/test_storage.dart diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies deleted file mode 100644 index c7d276f..0000000 --- a/example/.flutter-plugins-dependencies +++ /dev/null @@ -1 +0,0 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences","path":"/Users/gamino/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.4.3/","dependencies":[]}],"android":[{"name":"shared_preferences","path":"/Users/gamino/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.4.3/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"shared_preferences","dependencies":[]}],"date_created":"2021-03-18 10:59:48.691080","version":"2.0.2"} \ No newline at end of file diff --git a/example/.gitignore b/example/.gitignore deleted file mode 100644 index 19eb614..0000000 --- a/example/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -.DS_Store -.dart_tool/ - -.packages -.pub/ - -build/ - -.flutter-plugins - -.env.local -.idea - diff --git a/example/.metadata b/example/.metadata deleted file mode 100644 index 1580988..0000000 --- a/example/.metadata +++ /dev/null @@ -1,8 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 12bbaba9ae044d0ea77da4dd5e4db15eed403f09 - channel: beta diff --git a/example/README.md b/example/README.md deleted file mode 100644 index c31bdfb..0000000 --- a/example/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# Secure Counter - -An example Flutter project for [Amazon Cognito Identity Dart](https://github.com/jonsaw/amazon-cognito-identity-dart). - -

- -

- -See [Example Secure Counter Server](https://github.com/jonsaw/example-secure-counter-server) for sample API implementation. - -### Sign Up - -

- -

- -### Confirm Account - -

- -

- -### Login - -

- -

- -### Secured Screen - -

- -

- -## Getting Started - -For help getting started with Flutter, view the online -[documentation](https://flutter.io/). diff --git a/example/android/.gitignore b/example/android/.gitignore deleted file mode 100644 index 65b7315..0000000 --- a/example/android/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -*.iml -*.class -.gradle -/local.properties -/.idea/workspace.xml -/.idea/libraries -.DS_Store -/build -/captures -GeneratedPluginRegistrant.java diff --git a/example/android/.project b/example/android/.project deleted file mode 100644 index 3964dd3..0000000 --- a/example/android/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - android - Project android created by Buildship. - - - - - org.eclipse.buildship.core.gradleprojectbuilder - - - - - - org.eclipse.buildship.core.gradleprojectnature - - diff --git a/example/android/.settings/org.eclipse.buildship.core.prefs b/example/android/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index 62b1e2e..0000000 --- a/example/android/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,2 +0,0 @@ -#Sat May 12 11:24:00 MYT 2018 -connection.project.dir= diff --git a/example/android/app/.classpath b/example/android/app/.classpath deleted file mode 100644 index 8d8d85f..0000000 --- a/example/android/app/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/example/android/app/.project b/example/android/app/.project deleted file mode 100644 index ac485d7..0000000 --- a/example/android/app/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - app - Project app created by Buildship. - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.buildship.core.gradleprojectbuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.buildship.core.gradleprojectnature - - diff --git a/example/android/app/.settings/org.eclipse.buildship.core.prefs b/example/android/app/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index 8d5f91a..0000000 --- a/example/android/app/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,2 +0,0 @@ -#Sat May 12 11:24:00 MYT 2018 -connection.project.dir=.. diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle deleted file mode 100644 index 11e53e5..0000000 --- a/example/android/app/build.gradle +++ /dev/null @@ -1,51 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -apply plugin: 'com.android.application' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 27 - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.securecounter" - minSdkVersion 16 - targetSdkVersion 27 - versionCode 1 - versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.1' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' -} diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 020fe6e..0000000 --- a/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/example/android/app/src/main/java/com/example/securecounter/MainActivity.java b/example/android/app/src/main/java/com/example/securecounter/MainActivity.java deleted file mode 100644 index b88cb93..0000000 --- a/example/android/app/src/main/java/com/example/securecounter/MainActivity.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.example.securecounter; - -import android.os.Bundle; - -import io.flutter.app.FlutterActivity; -import io.flutter.plugins.GeneratedPluginRegistrant; - -public class MainActivity extends FlutterActivity { - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - GeneratedPluginRegistrant.registerWith(this); - } -} diff --git a/example/android/app/src/main/res/drawable/launch_background.xml b/example/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f..0000000 --- a/example/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7b0906d62b1847e87f15cdcacf6a4f29..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 544 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY3?!3`olAj~WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!h8bpbvhu0Wd6uZuB!w&u2PAxD2eNXD>P5D~Wn-+_Wa#27Xc zC?Zj|6r#X(-D3u$NCt}(Ms06KgJ4FxJVv{GM)!I~&n8Bnc94O7-Hd)cjDZswgC;Qs zO=b+9!WcT8F?0rF7!Uys2bs@gozCP?z~o%U|N3vA*22NaGQG zlg@K`O_XuxvZ&Ks^m&R!`&1=spLvfx7oGDKDwpwW`#iqdw@AL`7MR}m`rwr|mZgU`8P7SBkL78fFf!WnuYWm$5Z0 zNXhDbCv&49sM544K|?c)WrFfiZvCi9h0O)B3Pgg&ebxsLQ05GG~ AQ2+n{ diff --git a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79bb8a35cc66c3c1fd44f5a5526c1b78be..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 442 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA3?vioaBc-sk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xx&nMcT!A!W`0S9QKQy;}1Cl^CgaH=;G9cpY;r$Q>i*pfB zP2drbID<_#qf;rPZx^FqH)F_D#*k@@q03KywUtLX8Ua?`H+NMzkczFPK3lFz@i_kW%1NOn0|D2I9n9wzH8m|-tHjsw|9>@K=iMBhxvkv6m8Y-l zytQ?X=U+MF$@3 zt`~i=@j|6y)RWMK--}M|=T`o&^Ni>IoWKHEbBXz7?A@mgWoL>!*SXo`SZH-*HSdS+ yn*9;$7;m`l>wYBC5bq;=U}IMqLzqbYCidGC!)_gkIk_C@Uy!y&wkt5C($~2D>~)O*cj@FGjOCM)M>_ixfudOh)?xMu#Fs z#}Y=@YDTwOM)x{K_j*Q;dPdJ?Mz0n|pLRx{4n|)f>SXlmV)XB04CrSJn#dS5nK2lM zrZ9#~WelCp7&e13Y$jvaEXHskn$2V!!DN-nWS__6T*l;H&Fopn?A6HZ-6WRLFP=R` zqG+CE#d4|IbyAI+rJJ`&x9*T`+a=p|0O(+s{UBcyZdkhj=yS1>AirP+0R;mf2uMgM zC}@~JfByORAh4SyRgi&!(cja>F(l*O+nd+@4m$|6K6KDn_&uvCpV23&>G9HJp{xgg zoq1^2_p9@|WEo z*X_Uko@K)qYYv~>43eQGMdbiGbo>E~Q& zrYBH{QP^@Sti!`2)uG{irBBq@y*$B zi#&(U-*=fp74j)RyIw49+0MRPMRU)+a2r*PJ$L5roHt2$UjExCTZSbq%V!HeS7J$N zdG@vOZB4v_lF7Plrx+hxo7(fCV&}fHq)$ diff --git a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34e7a88e3f88bea192c3a370d44689c3c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1031 zcmeAS@N?(olHy`uVBq!ia0vp^6F``Q8Ax83A=Cw=BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFa`(sgt!6~Yi|1%a`XoT0ojZ}lNrNjb9xjc(B0U1_% zz5^97Xt*%oq$rQy4?0GKNfJ44uvxI)gC`h-NZ|&0-7(qS@?b!5r36oQ}zyZrNO3 zMO=Or+<~>+A&uN&E!^Sl+>xE!QC-|oJv`ApDhqC^EWD|@=#J`=d#Xzxs4ah}w&Jnc z$|q_opQ^2TrnVZ0o~wh<3t%W&flvYGe#$xqda2bR_R zvPYgMcHgjZ5nSA^lJr%;<&0do;O^tDDh~=pIxA#coaCY>&N%M2^tq^U%3DB@ynvKo}b?yu-bFc-u0JHzced$sg7S3zqI(2 z#Km{dPr7I=pQ5>FuK#)QwK?Y`E`B?nP+}U)I#c1+FM*1kNvWG|a(TpksZQ3B@sD~b zpQ2)*V*TdwjFOtHvV|;OsiDqHi=6%)o4b!)x$)%9pGTsE z-JL={-Ffv+T87W(Xpooq<`r*VzWQcgBN$$`u}f>-ZQI1BB8ykN*=e4rIsJx9>z}*o zo~|9I;xof diff --git a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eebdb28e45604e46eeda8dd24651419bc0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1443 zcmb`G{WsKk6vsdJTdFg%tJav9_E4vzrOaqkWF|A724Nly!y+?N9`YV6wZ}5(X(D_N(?!*n3`|_r0Hc?=PQw&*vnU?QTFY zB_MsH|!j$PP;I}?dppoE_gA(4uc!jV&0!l7_;&p2^pxNo>PEcNJv za5_RT$o2Mf!<+r?&EbHH6nMoTsDOa;mN(wv8RNsHpG)`^ymG-S5By8=l9iVXzN_eG%Xg2@Xeq76tTZ*dGh~Lo9vl;Zfs+W#BydUw zCkZ$o1LqWQO$FC9aKlLl*7x9^0q%0}$OMlp@Kk_jHXOjofdePND+j!A{q!8~Jn+s3 z?~~w@4?egS02}8NuulUA=L~QQfm;MzCGd)XhiftT;+zFO&JVyp2mBww?;QByS_1w! zrQlx%{^cMj0|Bo1FjwY@Q8?Hx0cIPF*@-ZRFpPc#bBw{5@tD(5%sClzIfl8WU~V#u zm5Q;_F!wa$BSpqhN>W@2De?TKWR*!ujY;Yylk_X5#~V!L*Gw~;$%4Q8~Mad z@`-kG?yb$a9cHIApZDVZ^U6Xkp<*4rU82O7%}0jjHlK{id@?-wpN*fCHXyXh(bLt* zPc}H-x0e4E&nQ>y%B-(EL=9}RyC%MyX=upHuFhAk&MLbsF0LP-q`XnH78@fT+pKPW zu72MW`|?8ht^tz$iC}ZwLp4tB;Q49K!QCF3@!iB1qOI=?w z7In!}F~ij(18UYUjnbmC!qKhPo%24?8U1x{7o(+?^Zu0Hx81|FuS?bJ0jgBhEMzf< zCgUq7r2OCB(`XkKcN-TL>u5y#dD6D!)5W?`O5)V^>jb)P)GBdy%t$uUMpf$SNV31$ zb||OojAbvMP?T@$h_ZiFLFVHDmbyMhJF|-_)HX3%m=CDI+ID$0^C>kzxprBW)hw(v zr!Gmda);ICoQyhV_oP5+C%?jcG8v+D@9f?Dk*!BxY}dazmrT@64UrP3hlslANK)bq z$67n83eh}OeW&SV@HG95P|bjfqJ7gw$e+`Hxo!4cx`jdK1bJ>YDSpGKLPZ^1cv$ek zIB?0S<#tX?SJCLWdMd{-ME?$hc7A$zBOdIJ)4!KcAwb=VMov)nK;9z>x~rfT1>dS+ zZ6#`2v@`jgbqq)P22H)Tx2CpmM^o1$B+xT6`(v%5xJ(?j#>Q$+rx_R|7TzDZe{J6q zG1*EcU%tE?!kO%^M;3aM6JN*LAKUVb^xz8-Pxo#jR5(-KBeLJvA@-gxNHx0M-ZJLl z;#JwQoh~9V?`UVo#}{6ka@II>++D@%KqGpMdlQ}?9E*wFcf5(#XQnP$Dk5~%iX^>f z%$y;?M0BLp{O3a(-4A?ewryHrrD%cx#Q^%KY1H zNre$ve+vceSLZcNY4U(RBX&)oZn*Py()h)XkE?PL$!bNb{N5FVI2Y%LKEm%yvpyTP z(1P?z~7YxD~Rf<(a@_y` diff --git a/example/android/app/src/main/res/values/styles.xml b/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 00fa441..0000000 --- a/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/example/android/build.gradle b/example/android/build.gradle deleted file mode 100644 index 4476887..0000000 --- a/example/android/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -buildscript { - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.0.1' - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/example/android/gradle.properties b/example/android/gradle.properties deleted file mode 100644 index 8bd86f6..0000000 --- a/example/android/gradle.properties +++ /dev/null @@ -1 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M diff --git a/example/android/gradle/wrapper/gradle-wrapper.jar b/example/android/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 13372aef5e24af05341d49695ee84e5f9b594659..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 53636 zcmafaW0a=B^559DjdyHo$F^PVt zzd|cWgMz^T0YO0lQ8%TE1O06v|NZl~LH{LLQ58WtNjWhFP#}eWVO&eiP!jmdp!%24 z{&z-MK{-h=QDqf+S+Pgi=_wg$I{F28X*%lJ>A7Yl#$}fMhymMu?R9TEB?#6@|Q^e^AHhxcRL$z1gsc`-Q`3j+eYAd<4@z^{+?JM8bmu zSVlrVZ5-)SzLn&LU9GhXYG{{I+u(+6ES+tAtQUanYC0^6kWkks8cG;C&r1KGs)Cq}WZSd3k1c?lkzwLySimkP5z)T2Ox3pNs;PdQ=8JPDkT7#0L!cV? zzn${PZs;o7UjcCVd&DCDpFJvjI=h(KDmdByJuDYXQ|G@u4^Kf?7YkE67fWM97kj6F z973tGtv!k$k{<>jd~D&c(x5hVbJa`bILdy(00%lY5}HZ2N>)a|))3UZ&fUa5@uB`H z+LrYm@~t?g`9~@dFzW5l>=p0hG%rv0>(S}jEzqQg6-jImG%Pr%HPtqIV_Ym6yRydW z4L+)NhcyYp*g#vLH{1lK-hQQSScfvNiNx|?nSn-?cc8}-9~Z_0oxlr~(b^EiD`Mx< zlOLK)MH?nl4dD|hx!jBCIku-lI(&v~bCU#!L7d0{)h z;k4y^X+=#XarKzK*)lv0d6?kE1< zmCG^yDYrSwrKIn04tG)>>10%+ zEKzs$S*Zrl+GeE55f)QjY$ zD5hi~J17k;4VSF_`{lPFwf^Qroqg%kqM+Pdn%h#oOPIsOIwu?JR717atg~!)*CgXk zERAW?c}(66rnI+LqM^l7BW|9dH~5g1(_w$;+AAzSYlqop*=u5}=g^e0xjlWy0cUIT7{Fs2Xqx*8% zW71JB%hk%aV-wjNE0*$;E-S9hRx5|`L2JXxz4TX3nf8fMAn|523ssV;2&145zh{$V z#4lt)vL2%DCZUgDSq>)ei2I`*aeNX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=`ShTf28<9p!81(0hFbGNqF%0gg*orez9!qt8e%o@Yfl@ zhvY}{@3&f??}7<`p>FyU;7?VkKbh8_=csozU=|fH&szgZ{=NDCylQ>EH^x5!K3~-V z)_2Y>0uJ`Z0Pb58y`RL+&n@m9tJ)O<%q#&u#DAIt+-rRt0eSe1MTtMl@W)H$b3D)@ z*A-1bUgZI)>HdcI4&W>P4W5{-j=s5p5`cbQ+{(g0+RDnz!TR^mxSLu_y#SDVKrj8i zA^hi6>jMGM;`$9Vfb-Yf!47b)Ow`2OKtNB=z|Kxa$5O}WPo;(Dc^`q(7X8kkeFyO8 z{XOq^07=u|7*P2`m;>PIFf=i80MKUxsN{d2cX0M+REsE*20+WQ79T9&cqT>=I_U% z{=8~^Isg(Nzo~`4iQfIb_#CVCD>#5h>=-Z#5dH}WxYzn%0)GAm6L2WdUdP=0_h>7f z(jh&7%1i(ZOn+}D8$iGK4Vs{pmHl_w4Qm-46H9>4^{3dz^DZDh+dw)6Xd@CpQNK$j z{CU;-cmpK=egplZ3y3%y=sEnCJ^eYVKXzV8H2_r*fJ*%*B;a1_lOpt6)IT1IAK2eB z{rie|uDJUrbgfUE>~C>@RO|m5ex55F{=~Bb4Cucp{ok7Yf9V}QuZ`#Gc|WaqsQlK- zKaV)iMRR__&Ak2Z=IM9R9g5$WM4u{a^C-7uX*!myEym z#_#p^T!P~#Dx$%^K>Y_nj_3J*E_LwJ60-5Xu=LkJAwcP@|0;a&+|+ZX`Jbj9P5;T% z|KOc}4*#4o{U?09`9Hz`Xo-I!P=9XfIrr*MQ}y=$!qgv?_J38^bNb4kM&_OVg^_=Eu-qG5U(fw0KMgH){C8pazq~51rN97hf#20-7=aK0)N|UM H-+%o-(+5aQ diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index aa901e1..0000000 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip diff --git a/example/android/gradlew b/example/android/gradlew deleted file mode 100755 index 9d82f78..0000000 --- a/example/android/gradlew +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/example/android/gradlew.bat b/example/android/gradlew.bat deleted file mode 100644 index 8a0b282..0000000 --- a/example/android/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/example/android/settings.gradle b/example/android/settings.gradle deleted file mode 100644 index 5a2f14f..0000000 --- a/example/android/settings.gradle +++ /dev/null @@ -1,15 +0,0 @@ -include ':app' - -def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() - -def plugins = new Properties() -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') -if (pluginsFile.exists()) { - pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } -} - -plugins.each { name, path -> - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() - include ":$name" - project(":$name").projectDir = pluginDirectory -} diff --git a/example/ios/.gitignore b/example/ios/.gitignore deleted file mode 100644 index 8339880..0000000 --- a/example/ios/.gitignore +++ /dev/null @@ -1,45 +0,0 @@ -.idea/ -.vagrant/ -.sconsign.dblite -.svn/ - -.DS_Store -*.swp -profile - -DerivedData/ -build/ -GeneratedPluginRegistrant.h -GeneratedPluginRegistrant.m - -.generated/ - -*.pbxuser -*.mode1v3 -*.mode2v3 -*.perspectivev3 - -!default.pbxuser -!default.mode1v3 -!default.mode2v3 -!default.perspectivev3 - -xcuserdata - -*.moved-aside - -*.pyc -*sync/ -Icon? -.tags* - -/Flutter/app.flx -/Flutter/app.zip -/Flutter/flutter_assets/ -/Flutter/App.framework -/Flutter/Flutter.framework -/Flutter/Generated.xcconfig -/Flutter/flutter_export_environment.sh -/ServiceDefinitions.json - -Pods/ diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 6c2de80..0000000 --- a/example/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,30 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - UIRequiredDeviceCapabilities - - arm64 - - MinimumOSVersion - 8.0 - - diff --git a/example/ios/Flutter/Debug.xcconfig b/example/ios/Flutter/Debug.xcconfig deleted file mode 100644 index e8efba1..0000000 --- a/example/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" -#include "Generated.xcconfig" diff --git a/example/ios/Flutter/Release.xcconfig b/example/ios/Flutter/Release.xcconfig deleted file mode 100644 index 399e934..0000000 --- a/example/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" -#include "Generated.xcconfig" diff --git a/example/ios/Podfile b/example/ios/Podfile deleted file mode 100644 index dc1da60..0000000 --- a/example/ios/Podfile +++ /dev/null @@ -1,63 +0,0 @@ -# Uncomment this line to define a global platform for your project -# platform :ios, '9.0' - -# CocoaPods analytics sends network stats synchronously affecting flutter build latency. -ENV['COCOAPODS_DISABLE_STATS'] = 'true' - -def parse_KV_file(file, separator='=') - file_abs_path = File.expand_path(file) - if !File.exists? file_abs_path - return []; - end - pods_ary = [] - skip_line_start_symbols = ["#", "/"] - File.foreach(file_abs_path) { |line| - next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } - plugin = line.split(pattern=separator) - if plugin.length == 2 - podname = plugin[0].strip() - path = plugin[1].strip() - podpath = File.expand_path("#{path}", file_abs_path) - pods_ary.push({:name => podname, :path => podpath}); - else - puts "Invalid plugin specification: #{line}" - end - } - return pods_ary -end - -target 'Runner' do - # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock - # referring to absolute paths on developers' machines. - system('rm -rf Pods/.symlinks') - system('mkdir -p Pods/.symlinks/plugins') - - # Flutter Pods - generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig') - if generated_xcode_build_settings.empty? - puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first." - end - generated_xcode_build_settings.map { |p| - if p[:name] == 'FLUTTER_FRAMEWORK_DIR' - symlink = File.join('Pods', '.symlinks', 'flutter') - File.symlink(File.dirname(p[:path]), symlink) - pod 'Flutter', :path => File.join(symlink, File.basename(p[:path])) - end - } - - # Plugin Pods - plugin_pods = parse_KV_file('../.flutter-plugins') - plugin_pods.map { |p| - symlink = File.join('Pods', '.symlinks', 'plugins', p[:name]) - File.symlink(p[:path], symlink) - pod p[:name], :path => File.join(symlink, 'ios') - } -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - target.build_configurations.each do |config| - config.build_settings['ENABLE_BITCODE'] = 'NO' - end - end -end diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock deleted file mode 100644 index c7c4f5a..0000000 --- a/example/ios/Podfile.lock +++ /dev/null @@ -1,22 +0,0 @@ -PODS: - - Flutter (1.0.0) - - shared_preferences (0.0.1): - - Flutter - -DEPENDENCIES: - - Flutter (from `Pods/.symlinks/flutter/ios`) - - shared_preferences (from `Pods/.symlinks/plugins/shared_preferences/ios`) - -EXTERNAL SOURCES: - Flutter: - :path: Pods/.symlinks/flutter/ios - shared_preferences: - :path: Pods/.symlinks/plugins/shared_preferences/ios - -SPEC CHECKSUMS: - Flutter: 9d0fac939486c9aba2809b7982dfdbb47a7b0296 - shared_preferences: 5a1d487c427ee18fcd3ea1f2a131569481834b53 - -PODFILE CHECKSUM: 13dcf421f4da2e937a57e8ba760ed880beae536f - -COCOAPODS: 1.5.3 diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 58d70db..0000000 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,497 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; - 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 84DF10AACA19FB3E11B917A1 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BC63D82579DAA357A8069BA /* libPods-Runner.a */; }; - 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; - 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; - 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; }; - 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; - 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, - 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 8BC63D82579DAA357A8069BA /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, - 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, - 84DF10AACA19FB3E11B917A1 /* libPods-Runner.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9414468371537E9608337BBA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 8BC63D82579DAA357A8069BA /* libPods-Runner.a */, - ); - name = Frameworks; - sourceTree = ""; - }; - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 2D5378251FAA1A9400D5DBA9 /* flutter_assets */, - 3B80C3931E831B6300D905FE /* App.framework */, - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEBA1CF902C7004384FC /* Flutter.framework */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - DC0648D8B23D18EB3A82A48A /* Pods */, - 9414468371537E9608337BBA /* Frameworks */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 97C146F11CF9000F007C117D /* Supporting Files */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - ); - path = Runner; - sourceTree = ""; - }; - 97C146F11CF9000F007C117D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 97C146F21CF9000F007C117D /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - DC0648D8B23D18EB3A82A48A /* Pods */ = { - isa = PBXGroup; - children = ( - ); - name = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - DB294B4040A27029761AE5A7 /* [CP] Check Pods Manifest.lock */, - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - AE5405746F59C248DEA799A1 /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0910; - ORGANIZATIONNAME = "The Chromium Authors"; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; - AE5405746F59C248DEA799A1 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", - "${PODS_ROOT}/.symlinks/flutter/ios/Flutter.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - DB294B4040A27029761AE5A7 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, - 97C146F31CF9000F007C117D /* main.m in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ARCHS = arm64; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = 1; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.secureCounter; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ARCHS = arm64; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = 1; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.secureCounter; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a1..0000000 --- a/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index 1263ac8..0000000 --- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/example/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 21a3cc1..0000000 --- a/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 949b678..0000000 --- a/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - BuildSystemType - Original - - diff --git a/example/ios/Runner/AppDelegate.h b/example/ios/Runner/AppDelegate.h deleted file mode 100644 index cf210d2..0000000 --- a/example/ios/Runner/AppDelegate.h +++ /dev/null @@ -1,6 +0,0 @@ -#import -#import - -@interface AppDelegate : FlutterAppDelegate - -@end diff --git a/example/ios/Runner/AppDelegate.m b/example/ios/Runner/AppDelegate.m deleted file mode 100644 index 112becd..0000000 --- a/example/ios/Runner/AppDelegate.m +++ /dev/null @@ -1,12 +0,0 @@ -#include "AppDelegate.h" -#include "GeneratedPluginRegistrant.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - [GeneratedPluginRegistrant registerWithRegistry:self]; - // Override point for customization after application launch. - return [super application:application didFinishLaunchingWithOptions:launchOptions]; -} - -@end diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fa..0000000 --- a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index 3d43d11e66f4de3da27ed045ca4fe38ad8b48094..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11112 zcmeHN3sh5A)((b(k1DoWZSj%R+R=^`Y(b;ElB$1^R>iT7q6h&WAVr806i~>Gqn6rM z>3}bMG&oq%DIriqR35=rtEdos5L6z)YC*Xq0U-$_+Il@RaU zXYX%+``hR28`(B*uJ6G9&iz>|)PS%!)9N`7=LcmcxH}k69HPyT-%S zH7+jBCC<%76cg_H-n41cTqnKn`u_V9p~XaTLUe3s{KRPSTeK6apP4Jg%VQ$e#72ms zxyWzmGSRwN?=fRgpx!?W&ZsrLfuhAsRxm%;_|P@3@3~BJwY4ZVBJ3f&$5x>`^fD?d zI+z!v#$!gz%FtL*%mR^Uwa*8LJFZ_;X!y$cD??W#c)31l@ervOa_Qk86R{HJiZb$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^_t!HN&HIPL-ZpcgWitHM&yFRC7!k4zSI+-<_uQ}|tX)n{Ib;X>Xx>i_d*KkH zCzogKQFpP1408_2!ofU|iBq2R8hW6G zuqJs9Tyw{u%-uWczPLkM!MfKfflt+NK9Vk8E!C>AsJwNDRoe2~cL+UvqNP|5J8t)( z0$iMa!jhudJ+fqFn+um&@Oj6qXJd_3-l`S^I1#0fnt!z3?D*hAHr*u(*wR@`4O z#avrtg%s`Fh{?$FtBFM^$@@hW!8ZfF4;=n0<8In&X}-Rp=cd0TqT_ne46$j^r}FzE z26vX^!PzScuQfFfl1HEZ{zL?G88mcc76zHGizWiykBf4m83Z${So-+dZ~YGhm*RO7 zB1gdIdqnFi?qw+lPRFW5?}CQ3Me3G^muvll&4iN+*5#_mmIu;loULMwb4lu9U*dFM z-Sr**(0Ei~u=$3<6>C-G6z4_LNCx||6YtjS)<;hf)YJTPKXW+w%hhCTUAInIse9>r zl2YU6nRb$u-FJlWN*{{%sm_gi_UP5{=?5}5^D2vPzM=oPfNw~azZQ#P zl5z8RtSSiTIpEohC15i-Q1Bk{3&ElsD0uGAOxvbk29VUDmmA0w;^v`W#0`};O3DVE z&+-ca*`YcN%z*#VXWK9Qa-OEME#fykF%|7o=1Y+eF;Rtv0W4~kKRDx9YBHOWhC%^I z$Jec0cC7o37}Xt}cu)NH5R}NT+=2Nap*`^%O)vz?+{PV<2~qX%TzdJOGeKj5_QjqR&a3*K@= P-1+_A+?hGkL;m(J7kc&K diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf03016f6c994b70f38d1b7346e5831b531f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 564 zcmV-40?Yl0P)Px$?ny*JR5%f>l)FnDQ543{x%ZCiu33$Wg!pQFfT_}?5Q|_VSlIbLC`dpoMXL}9 zHfd9&47Mo(7D231gb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qeI34nh zexFeA?&C3B2(E?0{drE@DA2pu(A#ElY&6el60Rn|Qpn-FkfQ8M93AfWIr)drgDFEU zghdWK)^71EWCP(@(=c4kfH1Y(4iugD4fve6;nSUpLT%!)MUHs1!zJYy4y||C+SwQ! z)KM&$7_tyM`sljP2fz6&Z;jxRn{Wup8IOUx8D4uh&(=O zx-7$a;U><*5L^!%xRlw)vAbh;sdlR||& ze}8_8%)c2Fwy=F&H|LM+p{pZB5DKTx>Y?F1N%BlZkXf!}JeGuMZk~LPi7{cidvUGB zAJ4LVeNV%XO>LTrklB#^-;8nb;}6l;1oW&WS=Mz*Az!4cqqQzbOSFq`$Q%PfD7srM zpKgP-D_0XPTRX*hAqeq0TDkJ;5HB1%$3Np)99#16c{ zJImlNL(npL!W|Gr_kxl1GVmF5&^$^YherS7+~q$p zt}{a=*RiD2Ikv6o=IM1kgc7zqpaZ;OB)P!1zz*i3{U()Dq#jG)egvK}@uFLa`oyWZ zf~=MV)|yJn`M^$N%ul5);JuQvaU1r2wt(}J_Qgyy`qWQI`hEeRX0uC@c1(dQ2}=U$ tNIIaX+dr)NRWXcxoR{>fqI{SF_dm1Ylv~=3YHI)h002ovPDHLkV1g(pWS;;4 diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0bca859a3f474b03065bef75ba58a9e4c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1588 zcmV-42Fv-0P)C1SqPt}wig>|5Crh^=oyX$BK<}M8eLU3e2hGT;=G|!_SP)7zNI6fqUMB=)y zRAZ>eDe#*r`yDAVgB_R*LB*MAc)8(b{g{9McCXW!lq7r(btRoB9!8B-#AI6JMb~YFBEvdsV)`mEQO^&#eRKx@b&x- z5lZm*!WfD8oCLzfHGz#u7sT0^VLMI1MqGxF^v+`4YYnVYgk*=kU?HsSz{v({E3lb9 z>+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#^lnKqU md>ggs(5nOWAqO?umG&QVYK#ibz}*4>0000U6E9hRK9^#O7(mu>ETqrXGsduA8$)?`v2seloOCza43C{NQ$$gAOH**MCn0Q?+L7dl7qnbRdqZ8LSVp1ItDxhxD?t@5_yHg6A8yI zC*%Wgg22K|8E#!~cTNYR~@Y9KepMPrrB8cABapAFa=`H+UGhkXUZV1GnwR1*lPyZ;*K(i~2gp|@bzp8}og7e*#% zEnr|^CWdVV!-4*Y_7rFvlww2Ze+>j*!Z!pQ?2l->4q#nqRu9`ELo6RMS5=br47g_X zRw}P9a7RRYQ%2Vsd0Me{_(EggTnuN6j=-?uFS6j^u69elMypu?t>op*wBx<=Wx8?( ztpe^(fwM6jJX7M-l*k3kEpWOl_Vk3@(_w4oc}4YF4|Rt=2V^XU?#Yz`8(e?aZ@#li0n*=g^qOcVpd-Wbok=@b#Yw zqn8u9a)z>l(1kEaPYZ6hwubN6i<8QHgsu0oE) ziJ(p;Wxm>sf!K+cw>R-(^Y2_bahB+&KI9y^);#0qt}t-$C|Bo71lHi{_+lg#f%RFy z0um=e3$K3i6K{U_4K!EX?F&rExl^W|G8Z8;`5z-k}OGNZ0#WVb$WCpQu-_YsiqKP?BB# vzVHS-CTUF4Ozn5G+mq_~Qqto~ahA+K`|lyv3(-e}00000NkvXXu0mjfd`9t{ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7edb86cdfe0d15b4b0d98334a86163658..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1716 zcmds$`#;kQ7{|XelZftyR5~xW7?MLxS4^|Hw3&P7^y)@A9Fj{Xm1~_CIV^XZ%SLBn zA;!r`GqGHg=7>xrB{?psZQs88ZaedDoagm^KF{a*>G|dJWRSe^I$DNW008I^+;Kjt z>9p3GNR^I;v>5_`+91i(*G;u5|L+Bu6M=(afLjtk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Y(4iugD4fve6;nSUpLT%!)MUHs1!zJYy4y||C+SwQ! z)KM&$7_tyM`sljP2fz6&Z;jxRn{Wup8IOUx8D4uh&(=O zx-7$a;U><*5L^!%xRlw)vAbh;sdlR||& ze}8_8%)c2Fwy=F&H|LM+p{pZB5DKTx>Y?F1N%BlZkXf!}JeGuMZk~LPi7{cidvUGB zAJ4LVeNV%XO>LTrklB#^-;8nb;}6l;1oW&WS=Mz*Az!4cqqQzbOSFq`$Q%PfD7srM zpKgP-D_0XPTRX*hAqeq0TDkJ;5HB1%$3Np)99#16c{ zJImlNL(npL!W|Gr_kxl1GVmF5&^$^YherS7+~q$p zt}{a=*RiD2Ikv6o=IM1kgc7zqpaZ;OB)P!1zz*i3{U()Dq#jG)egvK}@uFLa`oyWZ zf~=MV)|yJn`M^$N%ul5);JuQvaU1r2wt(}J_Qgyy`qWQI`hEeRX0uC@c1(dQ2}=U$ tNIIaX+dr)NRWXcxoR{>fqI{SF_dm1Ylv~=3YHI)h002ovPDHLkV1g(pWS;;4 diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5cee1c98386d13b17e89f719e83555b2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1895 zcmV-t2blPYP)FQtfgmafE#=YDCq`qUBt#QpG%*H6QHY765~R=q zZ6iudfM}q!Pz#~9JgOi8QJ|DSu?1-*(kSi1K4#~5?#|rh?sS)(-JQqX*}ciXJ56_H zdw=^s_srbAdqxlvGyrgGet#6T7_|j;95sL%MtM;q86vOxKM$f#puR)Bjv9Zvz9-di zXOTSsZkM83)E9PYBXC<$6(|>lNLVBb&&6y{NByFCp%6+^ALR@NCTse_wqvNmSWI-m z!$%KlHFH2omF!>#%1l3LTZg(s7eof$7*xB)ZQ0h?ejh?Ta9fDv59+u#MokW+1t8Zb zgHv%K(u9G^L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r0colr}QJ3hcSdLu;9;td>kf@Tcn<@9sIx&=m z;AD;SCh95=&p;$r{Xz3iWCO^MX83AGJ(yH&eTXgv|0=34#-&WAmw{)U7OU9!Wz^!7 zZ%jZFi@JR;>Mhi7S>V7wQ176|FdW2m?&`qa(ScO^CFPR80HucLHOTy%5s*HR0^8)i h0WYBP*#0Ks^FNSabJA*5${_#%002ovPDHLkV1oKhTl@e3 diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609df07bf62e5100a53a01510388bd2b22..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2665 zcmV-v3YPVWP)oFh3q0MFesq&64WThn3$;G69TfjsAv=f2G9}p zgSx99+!YV6qME!>9MD13x)k(+XE7W?_O4LoLb5ND8 zaV{9+P@>42xDfRiYBMSgD$0!vssptcb;&?u9u(LLBKmkZ>RMD=kvD3h`sk6!QYtBa ztlZI#nu$8lJ^q2Z79UTgZe>BU73(Aospiq+?SdMt8lDZ;*?@tyWVZVS_Q7S&*tJaiRlJ z+aSMOmbg3@h5}v;A*c8SbqM3icg-`Cnwl;7Ts%A1RkNIp+Txl-Ckkvg4oxrqGA5ewEgYqwtECD<_3Egu)xGllKt&J8g&+=ac@Jq4-?w6M3b*>w5 z69N3O%=I^6&UL5gZ!}trC7bUj*12xLdkNs~Bz4QdJJ*UDZox2UGR}SNg@lmOvhCc~ z*f_UeXv(=#I#*7>VZx2ObEN~UoGUTl=-@)E;YtCRZ>SVp$p9yG5hEFZ!`wI!spd)n zSk+vK0Vin7FL{7f&6OB%f;SH22dtbcF<|9fi2Fp%q4kxL!b1#l^)8dUwJ zwEf{(wJj@8iYDVnKB`eSU+;ml-t2`@%_)0jDM`+a46xhDbBj2+&Ih>1A>6aky#(-SYyE{R3f#y57wfLs z6w1p~$bp;6!9DX$M+J~S@D6vJAaElETns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cassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609df07bf62e5100a53a01510388bd2b22..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2665 zcmV-v3YPVWP)oFh3q0MFesq&64WThn3$;G69TfjsAv=f2G9}p zgSx99+!YV6qME!>9MD13x)k(+XE7W?_O4LoLb5ND8 zaV{9+P@>42xDfRiYBMSgD$0!vssptcb;&?u9u(LLBKmkZ>RMD=kvD3h`sk6!QYtBa ztlZI#nu$8lJ^q2Z79UTgZe>BU73(Aospiq+?SdMt8lDZ;*?@tyWVZVS_Q7S&*tJaiRlJ z+aSMOmbg3@h5}v;A*c8SbqM3icg-`Cnwl;7Ts%A1RkNIp+Txl-Ckkvg4oxrqGA5ewEgYqwtECD<_3Egu)xGllKt&J8g&+=ac@Jq4-?w6M3b*>w5 z69N3O%=I^6&UL5gZ!}trC7bUj*12xLdkNs~Bz4QdJJ*UDZox2UGR}SNg@lmOvhCc~ z*f_UeXv(=#I#*7>VZx2ObEN~UoGUTl=-@)E;YtCRZ>SVp$p9yG5hEFZ!`wI!spd)n zSk+vK0Vin7FL{7f&6OB%f;SH22dtbcF<|9fi2Fp%q4kxL!b1#l^)8dUwJ zwEf{(wJj@8iYDVnKB`eSU+;ml-t2`@%_)0jDM`+a46xhDbBj2+&Ih>1A>6aky#(-SYyE{R3f#y57wfLs z6w1p~$bp;6!9DX$M+J~S@D6vJAaElETnsX4h9a5tvPhC3L@qB~bOzkL@^z0k_hS{T4PF*TDrgdXp+dzsE? z>V|VR035Pl9n5&-RePFdS{7KAr2vPOqR9=M$vXA1Yy5>w;EsF`;OK{2pkn-kpp9Pw z)r;5JfJKKaT$4qCb{TaXHjb$QA{y0EYy*+b1XI;6Ah- zw13P)xT`>~eFoJC!>{2XL(a_#upp3gaR1#5+L(Jmzp4TBnx{~WHedpJ1ch8JFk~Sw z>F+gN+i+VD?gMXwcIhn8rz`>e>J^TI3E-MW>f}6R-pL}>WMOa0k#jN+`RyUVUC;#D zg|~oS^$6%wpF{^Qr+}X>0PKcr3Fc&>Z>uv@C);pwDs@2bZWhYP!rvGx?_|q{d`t<*XEb#=aOb=N+L@CVBGqImZf&+a zCQEa3$~@#kC);pasdG=f6tuIi0PO-y&tvX%>Mv=oY3U$nD zJ#gMegnQ46pq+3r=;zmgcG+zRc9D~c>z+jo9&D+`E6$LmyFqlmCYw;-Zooma{sR@~ z)_^|YL1&&@|GXo*pivH7k!msl+$Sew3%XJnxajt0K%3M6Bd&YFNy9}tWG^aovK2eX z1aL1%7;KRDrA@eG-Wr6w+;*H_VD~qLiVI`{_;>o)k`{8xa3EJT1O_>#iy_?va0eR? zDV=N%;Zjb%Z2s$@O>w@iqt!I}tLjGk!=p`D23I}N4Be@$(|iSA zf3Ih7b<{zqpDB4WF_5X1(peKe+rASze%u8eKLn#KKXt;UZ+Adf$_TO+vTqshLLJ5c z52HucO=lrNVae5XWOLm!V@n-ObU11!b+DN<$RuU+YsrBq*lYT;?AwJpmNKniF0Q1< zJCo>Q$=v$@&y=sj6{r!Y&y&`0$-I}S!H_~pI&2H8Z1C|BX4VgZ^-! zje3-;x0PBD!M`v*J_)rL^+$<1VJhH*2Fi~aA7s&@_rUHYJ9zD=M%4AFQ`}k8OC$9s XsPq=LnkwKG00000NkvXXu0mjfhAk5^ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a5a98e212cca15ea7bf2ab5de5108680..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3831 zcmVjJBgitF5mAp-i>4+KS_oR{|13AP->1TD4=w)g|)JHOx|a2Wk1Va z!k)vP$UcQ#mdj%wNQoaJ!w>jv_6&JPyutpQps?s5dmDQ>`%?Bvj>o<%kYG!YW6H-z zu`g$@mp`;qDR!51QaS}|ZToSuAGcJ7$2HF0z`ln4t!#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W zfr^D%LNfOcTNvtx0JXR35J0~Jpi2#P3Q&80w+nqNfc}&G0A~*)lGHKv=^FE+b(37|)zL;KLF>oiGfb(?&1 zV3XRu!Sw>@quKiab%g6jun#oZ%!>V#A%+lNc?q>6+VvyAn=kf_6z^(TZUa4Eelh{{ zqFX-#dY(EV@7l$NE&kv9u9BR8&Ojd#ZGJ6l8_BW}^r?DIS_rU2(XaGOK z225E@kH5Opf+CgD^{y29jD4gHbGf{1MD6ggQ&%>UG4WyPh5q_tb`{@_34B?xfSO*| zZv8!)q;^o-bz`MuxXk*G^}(6)ACb@=Lfs`Hxoh>`Y0NE8QRQ!*p|SH@{r8=%RKd4p z+#Ty^-0kb=-H-O`nAA3_6>2z(D=~Tbs(n8LHxD0`R0_ATFqp-SdY3(bZ3;VUM?J=O zKCNsxsgt@|&nKMC=*+ZqmLHhX1KHbAJs{nGVMs6~TiF%Q)P@>!koa$%oS zjXa=!5>P`vC-a}ln!uH1ooeI&v?=?v7?1n~P(wZ~0>xWxd_Aw;+}9#eULM7M8&E?Y zC-ZLhi3RoM92SXUb-5i-Lmt5_rfjE{6y^+24`y$1lywLyHO!)Boa7438K4#iLe?rh z2O~YGSgFUBH?og*6=r9rme=peP~ah`(8Zt7V)j5!V0KPFf_mebo3z95U8(up$-+EA^9dTRLq>Yl)YMBuch9%=e5B`Vnb>o zt03=kq;k2TgGe4|lGne&zJa~h(UGutjP_zr?a7~#b)@15XNA>Dj(m=gg2Q5V4-$)D|Q9}R#002ovPDHLkV1o7DH3k3x diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39da7941ef3f6dcb7f06a192d8dcb308d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1888 zcmV-m2cP(fP)x~L`~4d)Rspd&<9kFh{hn*KP1LP0~$;u(LfAu zp%fx&qLBcRHx$G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d8?N!_w~4v+f-HCF|a$TNZDoNl$I1Uq87euoNgKb6&r26TNrfkUa@o zfdiFA@p{K&mH3b8i!lcoz)V{n8Q@g(vR4ns4r6w;K z>1~ecQR0-<^J|Ndg5fvVUM9g;lbu-){#ghGw(fg>L zh)T5Ljb%lWE;V9L!;Cqk>AV1(rULYF07ZBJbGb9qbSoLAd;in9{)95YqX$J43-dY7YU*k~vrM25 zxh5_IqO0LYZW%oxQ5HOzmk4x{atE*vipUk}sh88$b2tn?!ujEHn`tQLe&vo}nMb&{ zio`xzZ&GG6&ZyN3jnaQy#iVqXE9VT(3tWY$n-)uWDQ|tc{`?fq2F`oQ{;d3aWPg4Hp-(iE{ry>MIPWL> iW8Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eacad3b03bb08bbddbbf4ac48dd78b3d838..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eacad3b03bb08bbddbbf4ac48dd78b3d838..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725..0000000 --- a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/example/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c..0000000 --- a/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/example/ios/Runner/Base.lproj/Main.storyboard b/example/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c2851..0000000 --- a/example/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/example/ios/Runner/Info.plist b/example/ios/Runner/Info.plist deleted file mode 100644 index 61ff725..0000000 --- a/example/ios/Runner/Info.plist +++ /dev/null @@ -1,49 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - secure_counter - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - arm64 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/example/ios/Runner/main.m b/example/ios/Runner/main.m deleted file mode 100644 index 0ccc450..0000000 --- a/example/ios/Runner/main.m +++ /dev/null @@ -1,9 +0,0 @@ -#import -#import -#import "AppDelegate.h" - -int main(int argc, char * argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/example/lib/main.dart b/example/lib/main.dart deleted file mode 100644 index 2efa6b4..0000000 --- a/example/lib/main.dart +++ /dev/null @@ -1,898 +0,0 @@ -import 'dart:async'; -import 'dart:convert'; - -import 'package:amazon_cognito_identity_dart_2/cognito.dart'; -import 'package:amazon_cognito_identity_dart_2/sig_v4.dart'; -import 'package:flutter/material.dart'; -import 'package:http/http.dart' as http; -import 'package:shared_preferences/shared_preferences.dart'; - -// Setup AWS User Pool Id & Client Id settings here: -const _awsUserPoolId = 'ap-southeast-1_xxxxxxxxx'; -const _awsClientId = 'xxxxxxxxxxxxxxxxxxxxxxxxxx'; - -const _identityPoolId = 'ap-southeast-1:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'; - -// Setup endpoints here: -const _region = 'ap-southeast-1'; -const _endpoint = - 'https://xxxxxxxxxx.execute-api.ap-southeast-1.amazonaws.com/dev'; - -final userPool = CognitoUserPool(_awsUserPoolId, _awsClientId); - -/// Extend CognitoStorage with Shared Preferences to persist account -/// login sessions -class Storage extends CognitoStorage { - SharedPreferences _prefs; - Storage(this._prefs); - - @override - Future getItem(String key) async { - String item; - try { - item = json.decode(_prefs.getString(key)); - } catch (e) { - return null; - } - return item; - } - - @override - Future setItem(String key, value) async { - await _prefs.setString(key, json.encode(value)); - return getItem(key); - } - - @override - Future removeItem(String key) async { - final item = getItem(key); - if (item != null) { - await _prefs.remove(key); - return item; - } - return null; - } - - @override - Future clear() async { - await _prefs.clear(); - } -} - -class Counter { - int count; - Counter(this.count); - - factory Counter.fromJson(json) { - return Counter(json['count']); - } -} - -class User { - String email; - String name; - String password; - bool confirmed = false; - bool hasAccess = false; - - User({this.email, this.name}); - - /// Decode user from Cognito User Attributes - factory User.fromUserAttributes(List attributes) { - final user = User(); - attributes.forEach((attribute) { - if (attribute.getName() == 'email') { - user.email = attribute.getValue(); - } else if (attribute.getName() == 'name') { - user.name = attribute.getValue(); - } - }); - return user; - } -} - -class CounterService { - AwsSigV4Client awsSigV4Client; - CounterService(this.awsSigV4Client); - - /// Retrieve user's previous count from Lambda + DynamoDB - Future getCounter() async { - final signedRequest = - SigV4Request(awsSigV4Client, method: 'GET', path: '/counter'); - final response = - await http.get(signedRequest.url, headers: signedRequest.headers); - return Counter.fromJson(json.decode(response.body)); - } - - /// Increment user's count in DynamoDB - Future incrementCounter() async { - final signedRequest = - SigV4Request(awsSigV4Client, method: 'PUT', path: '/counter'); - final response = - await http.put(signedRequest.url, headers: signedRequest.headers); - return Counter.fromJson(json.decode(response.body)); - } -} - -class UserService { - CognitoUserPool _userPool; - CognitoUser _cognitoUser; - CognitoUserSession _session; - UserService(this._userPool); - CognitoCredentials credentials; - - /// Initiate user session from local storage if present - Future init() async { - final prefs = await SharedPreferences.getInstance(); - final storage = Storage(prefs); - _userPool.storage = storage; - - _cognitoUser = await _userPool.getCurrentUser(); - if (_cognitoUser == null) { - return false; - } - _session = await _cognitoUser.getSession(); - return _session.isValid(); - } - - /// Get existing user from session with his/her attributes - Future getCurrentUser() async { - if (_cognitoUser == null || _session == null) { - return null; - } - if (!_session.isValid()) { - return null; - } - final attributes = await _cognitoUser.getUserAttributes(); - if (attributes == null) { - return null; - } - final user = User.fromUserAttributes(attributes); - user.hasAccess = true; - return user; - } - - /// Retrieve user credentials -- for use with other AWS services - Future getCredentials() async { - if (_cognitoUser == null || _session == null) { - return null; - } - credentials = CognitoCredentials(_identityPoolId, _userPool); - await credentials.getAwsCredentials(_session.getIdToken().getJwtToken()); - return credentials; - } - - /// Login user - Future login(String email, String password) async { - _cognitoUser = CognitoUser(email, _userPool, storage: _userPool.storage); - - final authDetails = AuthenticationDetails( - username: email, - password: password, - ); - - bool isConfirmed; - try { - _session = await _cognitoUser.authenticateUser(authDetails); - isConfirmed = true; - } on CognitoClientException catch (e) { - if (e.code == 'UserNotConfirmedException') { - isConfirmed = false; - } else { - rethrow; - } - } - - if (!_session.isValid()) { - return null; - } - - final attributes = await _cognitoUser.getUserAttributes(); - final user = User.fromUserAttributes(attributes); - user.confirmed = isConfirmed; - user.hasAccess = true; - - return user; - } - - /// Confirm user's account with confirmation code sent to email - Future confirmAccount(String email, String confirmationCode) async { - _cognitoUser = CognitoUser(email, _userPool, storage: _userPool.storage); - - return await _cognitoUser.confirmRegistration(confirmationCode); - } - - /// Resend confirmation code to user's email - Future resendConfirmationCode(String email) async { - _cognitoUser = CognitoUser(email, _userPool, storage: _userPool.storage); - await _cognitoUser.resendConfirmationCode(); - } - - /// Check if user's current session is valid - Future checkAuthenticated() async { - if (_cognitoUser == null || _session == null) { - return false; - } - return _session.isValid(); - } - - /// Sign upuser - Future signUp(String email, String password, String name) async { - CognitoUserPoolData data; - final userAttributes = [ - AttributeArg(name: 'name', value: name), - ]; - data = - await _userPool.signUp(email, password, userAttributes: userAttributes); - - final user = User(); - user.email = email; - user.name = name; - user.confirmed = data.userConfirmed; - - return user; - } - - Future signOut() async { - if (credentials != null) { - await credentials.resetAwsCredentials(); - } - if (_cognitoUser != null) { - return _cognitoUser.signOut(); - } - } -} - -void main() => runApp(SecureCounterApp()); - -class SecureCounterApp extends StatelessWidget { - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'Cognito on Flutter', - theme: ThemeData( - primarySwatch: Colors.orange, - ), - home: HomePage(title: 'Cognito on Flutter'), - ); - } -} - -class HomePage extends StatefulWidget { - HomePage({Key key, this.title}) : super(key: key); - - final String title; - - @override - _HomePageState createState() => _HomePageState(); -} - -class _HomePageState extends State { - @override - Widget build(BuildContext context) { - final Size screenSize = MediaQuery.of(context).size; - return Scaffold( - appBar: AppBar( - title: Text(widget.title), - ), - body: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Container( - padding: EdgeInsets.only(left: 20.0, right: 20.0, bottom: 20.0), - width: screenSize.width, - child: RaisedButton( - child: Text( - 'Sign Up', - style: TextStyle(color: Colors.white), - ), - onPressed: () { - Navigator.push( - context, - MaterialPageRoute(builder: (context) => SignUpScreen()), - ); - }, - color: Colors.blue, - ), - ), - Container( - padding: EdgeInsets.only(left: 20.0, right: 20.0, bottom: 20.0), - width: screenSize.width, - child: RaisedButton( - child: Text( - 'Confirm Account', - style: TextStyle(color: Colors.white), - ), - onPressed: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => ConfirmationScreen()), - ); - }, - color: Colors.blue, - ), - ), - Container( - padding: EdgeInsets.only(left: 20.0, right: 20.0, bottom: 20.0), - width: screenSize.width, - child: RaisedButton( - child: Text( - 'Login', - style: TextStyle(color: Colors.white), - ), - onPressed: () { - Navigator.push( - context, - MaterialPageRoute(builder: (context) => LoginScreen()), - ); - }, - color: Colors.blue, - ), - ), - Container( - padding: EdgeInsets.only(left: 20.0, right: 20.0, bottom: 20.0), - width: screenSize.width, - child: RaisedButton( - child: Text( - 'Secure Counter', - style: TextStyle(color: Colors.white), - ), - onPressed: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => SecureCounterScreen()), - ); - }, - color: Colors.blue, - ), - ), - ], - ), - ), - ); - } -} - -class SignUpScreen extends StatefulWidget { - @override - _SignUpScreenState createState() => _SignUpScreenState(); -} - -class _SignUpScreenState extends State { - final GlobalKey _formKey = GlobalKey(); - User _user = User(); - final userService = UserService(userPool); - - void submit(BuildContext context) async { - _formKey.currentState.save(); - - String message; - bool signUpSuccess = false; - try { - _user = await userService.signUp(_user.email, _user.password, _user.name); - signUpSuccess = true; - message = 'User sign up successful!'; - } on CognitoClientException catch (e) { - if (e.code == 'UsernameExistsException' || - e.code == 'InvalidParameterException' || - e.code == 'ResourceNotFoundException') { - message = e.message; - } else { - message = 'Unknown client error occurred'; - } - } catch (e) { - message = 'Unknown error occurred'; - } - - final snackBar = SnackBar( - content: Text(message), - action: SnackBarAction( - label: 'OK', - onPressed: () { - if (signUpSuccess) { - Navigator.pop(context); - if (!_user.confirmed) { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - ConfirmationScreen(email: _user.email)), - ); - } - } - }, - ), - duration: Duration(seconds: 30), - ); - - Scaffold.of(context).showSnackBar(snackBar); - } - - @override - Widget build(BuildContext context) { - final Size screenSize = MediaQuery.of(context).size; - return Scaffold( - appBar: AppBar( - title: Text('Sign Up'), - ), - body: Builder( - builder: (BuildContext context) { - return Container( - child: Form( - key: _formKey, - child: ListView( - children: [ - ListTile( - leading: const Icon(Icons.account_box), - title: TextFormField( - decoration: InputDecoration(labelText: 'Name'), - onSaved: (String name) { - _user.name = name; - }, - ), - ), - ListTile( - leading: const Icon(Icons.email), - title: TextFormField( - decoration: InputDecoration( - hintText: 'example@inspire.my', labelText: 'Email'), - keyboardType: TextInputType.emailAddress, - onSaved: (String email) { - _user.email = email; - }, - ), - ), - ListTile( - leading: const Icon(Icons.lock), - title: TextFormField( - decoration: InputDecoration( - hintText: 'Password!', - ), - obscureText: true, - onSaved: (String password) { - _user.password = password; - }, - ), - ), - Container( - padding: EdgeInsets.all(20.0), - width: screenSize.width, - child: RaisedButton( - child: Text( - 'Sign Up', - style: TextStyle(color: Colors.white), - ), - onPressed: () { - submit(context); - }, - color: Colors.blue, - ), - margin: EdgeInsets.only( - top: 10.0, - ), - ), - ], - ), - ), - ); - }, - ), - ); - } -} - -class ConfirmationScreen extends StatefulWidget { - ConfirmationScreen({Key key, this.email}) : super(key: key); - - final String email; - - @override - _ConfirmationScreenState createState() => _ConfirmationScreenState(); -} - -class _ConfirmationScreenState extends State { - final GlobalKey _formKey = GlobalKey(); - String confirmationCode; - User _user = User(); - final _userService = UserService(userPool); - - _submit(BuildContext context) async { - _formKey.currentState.save(); - bool accountConfirmed; - String message; - try { - accountConfirmed = - await _userService.confirmAccount(_user.email, confirmationCode); - message = 'Account successfully confirmed!'; - } on CognitoClientException catch (e) { - if (e.code == 'InvalidParameterException' || - e.code == 'CodeMismatchException' || - e.code == 'NotAuthorizedException' || - e.code == 'UserNotFoundException' || - e.code == 'ResourceNotFoundException') { - message = e.message; - } else { - message = 'Unknown client error occurred'; - } - } catch (e) { - message = 'Unknown error occurred'; - } - - final snackBar = SnackBar( - content: Text(message), - action: SnackBarAction( - label: 'OK', - onPressed: () { - if (accountConfirmed) { - Navigator.pop(context); - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => LoginScreen(email: _user.email)), - ); - } - }, - ), - duration: Duration(seconds: 30), - ); - - Scaffold.of(context).showSnackBar(snackBar); - } - - _resendConfirmation(BuildContext context) async { - _formKey.currentState.save(); - String message; - try { - await _userService.resendConfirmationCode(_user.email); - message = 'Confirmation code sent to ${_user.email}!'; - } on CognitoClientException catch (e) { - if (e.code == 'LimitExceededException' || - e.code == 'InvalidParameterException' || - e.code == 'ResourceNotFoundException') { - message = e.message; - } else { - message = 'Unknown client error occurred'; - } - } catch (e) { - message = 'Unknown error occurred'; - } - - final snackBar = SnackBar( - content: Text(message), - action: SnackBarAction( - label: 'OK', - onPressed: () {}, - ), - duration: Duration(seconds: 30), - ); - - Scaffold.of(context).showSnackBar(snackBar); - } - - @override - Widget build(BuildContext context) { - final Size screenSize = MediaQuery.of(context).size; - return Scaffold( - appBar: AppBar( - title: Text('Confirm Account'), - ), - body: Builder( - builder: (BuildContext context) => Container( - child: Form( - key: _formKey, - child: ListView( - children: [ - ListTile( - leading: const Icon(Icons.email), - title: TextFormField( - initialValue: widget.email, - decoration: InputDecoration( - hintText: 'example@inspire.my', - labelText: 'Email'), - keyboardType: TextInputType.emailAddress, - onSaved: (String email) { - _user.email = email; - }, - ), - ), - ListTile( - leading: const Icon(Icons.lock), - title: TextFormField( - decoration: - InputDecoration(labelText: 'Confirmation Code'), - onSaved: (String code) { - confirmationCode = code; - }, - ), - ), - Container( - padding: EdgeInsets.all(20.0), - width: screenSize.width, - child: RaisedButton( - child: Text( - 'Submit', - style: TextStyle(color: Colors.white), - ), - onPressed: () { - _submit(context); - }, - color: Colors.blue, - ), - margin: EdgeInsets.only( - top: 10.0, - ), - ), - Center( - child: InkWell( - child: Text( - 'Resend Confirmation Code', - style: TextStyle(color: Colors.blueAccent), - ), - onTap: () { - _resendConfirmation(context); - }, - ), - ), - ], - ), - ), - )), - ); - } -} - -class LoginScreen extends StatefulWidget { - LoginScreen({Key key, this.email}) : super(key: key); - - final String email; - - @override - _LoginScreenState createState() => _LoginScreenState(); -} - -class _LoginScreenState extends State { - final GlobalKey _formKey = GlobalKey(); - final _userService = UserService(userPool); - User _user = User(); - bool _isAuthenticated = false; - - Future _getValues() async { - await _userService.init(); - _isAuthenticated = await _userService.checkAuthenticated(); - return _userService; - } - - submit(BuildContext context) async { - _formKey.currentState.save(); - String message; - try { - _user = await _userService.login(_user.email, _user.password); - message = 'User sucessfully logged in!'; - if (!_user.confirmed) { - message = 'Please confirm user account'; - } - } on CognitoClientException catch (e) { - if (e.code == 'InvalidParameterException' || - e.code == 'NotAuthorizedException' || - e.code == 'UserNotFoundException' || - e.code == 'ResourceNotFoundException') { - message = e.message; - } else { - message = 'An unknown client error occured'; - } - } catch (e) { - message = 'An unknown error occurred'; - } - final snackBar = SnackBar( - content: Text(message), - action: SnackBarAction( - label: 'OK', - onPressed: () async { - if (_user.hasAccess) { - Navigator.pop(context); - if (!_user.confirmed) { - await Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - ConfirmationScreen(email: _user.email)), - ); - } - } - }, - ), - duration: Duration(seconds: 30), - ); - - Scaffold.of(context).showSnackBar(snackBar); - } - - @override - Widget build(BuildContext context) { - return FutureBuilder( - future: _getValues(), - builder: (context, AsyncSnapshot snapshot) { - if (snapshot.hasData) { - if (_isAuthenticated) { - return SecureCounterScreen(); - } - final Size screenSize = MediaQuery.of(context).size; - return Scaffold( - appBar: AppBar( - title: Text('Login'), - ), - body: Builder( - builder: (BuildContext context) { - return Container( - child: Form( - key: _formKey, - child: ListView( - children: [ - ListTile( - leading: const Icon(Icons.email), - title: TextFormField( - initialValue: widget.email, - decoration: InputDecoration( - hintText: 'example@inspire.my', - labelText: 'Email'), - keyboardType: TextInputType.emailAddress, - onSaved: (String email) { - _user.email = email; - }, - ), - ), - ListTile( - leading: const Icon(Icons.lock), - title: TextFormField( - decoration: - InputDecoration(labelText: 'Password'), - obscureText: true, - onSaved: (String password) { - _user.password = password; - }, - ), - ), - Container( - padding: EdgeInsets.all(20.0), - width: screenSize.width, - child: RaisedButton( - child: Text( - 'Login', - style: TextStyle(color: Colors.white), - ), - onPressed: () { - submit(context); - }, - color: Colors.blue, - ), - margin: EdgeInsets.only( - top: 10.0, - ), - ), - ], - ), - ), - ); - }, - ), - ); - } - return Scaffold(appBar: AppBar(title: Text('Loading...'))); - }); - } -} - -class SecureCounterScreen extends StatefulWidget { - SecureCounterScreen({Key key}) : super(key: key); - - @override - _SecureCounterScreenState createState() => _SecureCounterScreenState(); -} - -class _SecureCounterScreenState extends State { - final _userService = UserService(userPool); - CounterService _counterService; - AwsSigV4Client _awsSigV4Client; - User _user = User(); - Counter _counter = Counter(0); - bool _isAuthenticated = false; - - void _incrementCounter() async { - final counter = await _counterService.incrementCounter(); - setState(() { - _counter = counter; - }); - } - - Future _getValues(BuildContext context) async { - try { - await _userService.init(); - _isAuthenticated = await _userService.checkAuthenticated(); - if (_isAuthenticated) { - // get user attributes from cognito - _user = await _userService.getCurrentUser(); - - // get session credentials - final credentials = await _userService.getCredentials(); - _awsSigV4Client = AwsSigV4Client( - credentials.accessKeyId, credentials.secretAccessKey, _endpoint, - region: _region, sessionToken: credentials.sessionToken); - - // get previous count - _counterService = CounterService(_awsSigV4Client); - _counter = await _counterService.getCounter(); - } - return _userService; - } on CognitoClientException catch (e) { - if (e.code == 'NotAuthorizedException') { - await _userService.signOut(); - Navigator.pop(context); - } - rethrow; - } - } - - @override - Widget build(BuildContext context) { - return FutureBuilder( - future: _getValues(context), - builder: (context, AsyncSnapshot snapshot) { - if (snapshot.hasData) { - if (!_isAuthenticated) { - return LoginScreen(); - } - - return Scaffold( - appBar: AppBar( - title: Text('Secure Counter'), - ), - body: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - 'Welcome ${_user.name}!', - style: Theme.of(context).textTheme.display1, - ), - Divider(), - Text( - 'You have pushed the button this many times:', - ), - Text( - '${_counter.count}', - style: Theme.of(context).textTheme.display1, - ), - Divider(), - Center( - child: InkWell( - child: Text( - 'Logout', - style: TextStyle(color: Colors.blueAccent), - ), - onTap: () { - _userService.signOut(); - Navigator.pop(context); - }, - ), - ), - ], - ), - ), - floatingActionButton: FloatingActionButton( - onPressed: () { - if (snapshot.hasData) { - _incrementCounter(); - } - }, - tooltip: 'Increment', - child: Icon(Icons.add), - ), - ); - } - return Scaffold(appBar: AppBar(title: Text('Loading...'))); - }); - } -} diff --git a/example/pubspec.yaml b/example/pubspec.yaml deleted file mode 100644 index 5fa0ae0..0000000 --- a/example/pubspec.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: secure_counter -description: Example App for Amazon Cognito Identity SDK - for Dart - -dependencies: - flutter: - sdk: flutter - cupertino_icons: "^0.1.0" - amazon_cognito_identity_dart_2: "^0.1.9" - shared_preferences: "^0.4.1" - -dev_dependencies: - flutter_test: - sdk: flutter - -flutter: - uses-material-design: true - -environment: - sdk: '>=2.12.0 <3.0.0' diff --git a/example/secure_counter.iml b/example/secure_counter.iml deleted file mode 100644 index e5c8371..0000000 --- a/example/secure_counter.iml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/example/secure_counter_android.iml b/example/secure_counter_android.iml deleted file mode 100644 index b050030..0000000 --- a/example/secure_counter_android.iml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/test/authentication_helper_test.dart b/test/authentication_helper_test.dart deleted file mode 100644 index 32d7554..0000000 --- a/test/authentication_helper_test.dart +++ /dev/null @@ -1,90 +0,0 @@ -import 'dart:convert'; - -import 'package:amazon_cognito_identity_dart_2/src/authentication_helper.dart'; -import 'package:test/test.dart'; - -void main() { - test('constructor should generate valid k', () { - final h = AuthenticationHelper('pool_name'); - expect( - h.k.toRadixString(16), - equals( - '538282c4354742d7cbbde2359fcf67f9f5b3a6b08791e5011b43b8a5b66d9ee6')); - }); - test('.getLargeAValue() returns largeAValue', () { - final h = AuthenticationHelper('pool_name'); - expect(h.getLargeAValue(), TypeMatcher()); - }); - test('.getSmallAValue() returns largeAValue', () { - final h = AuthenticationHelper('pool_name'); - expect(h.getSmallAValue(), TypeMatcher()); - }); - test('.generateRandomSmallA() returns 128-length BigInteger', () { - final h = AuthenticationHelper('pool_name'); - expect(h.generateRandomSmallA(), TypeMatcher()); - expect(h.generateRandomSmallA().toRadixString(16).length, equals(128)); - }); - test('.hexHash() generates valid hash', () { - final h = AuthenticationHelper('pool_name'); - expect( - h.hexHash('1ab23cd4'), - equals( - '7999d2b0d9387917b38fcbd522f14229cafc44bf34f59aadb4a4766056697273')); - }); - test('.generateHashDevice() generates verifierDevices', () { - final h = AuthenticationHelper('pool_name'); - h.generateHashDevice('macbook:key', 'see.saw@email.com'); - expect(h.getVerifierDevices()!.length, anyOf([766, 768, 770])); - }); - test('.padHex() with odd length pads left', () { - final h = AuthenticationHelper('pool_name'); - expect(h.padHex(BigInt.parse('123af', radix: 16)), equals('0123af')); - }); - test('.padHex() with leading 89ABCDEFabcdef pads left', () { - final h = AuthenticationHelper('pool_name'); - final tests = { - '8afff8': '008afff8', - '9afff9': '009afff9', - 'aafffa': '00aafffa', - 'bafffb': '00bafffb', - 'cafffc': '00cafffc', - 'dafffd': '00dafffd', - 'eafffe': '00eafffe', - 'faffff': '00faffff', - '0afff0': '0afff0', - '1afff1': '1afff1', - '2afff2': '2afff2', - '3afff3': '3afff3', - '4afff4': '4afff4', - '5afff5': '5afff5', - '6afff6': '6afff6', - '7afff7': '7afff7' - }; - tests.forEach((input, expected) { - expect(h.padHex(BigInt.parse(input, radix: 16)), equals(expected)); - }); - }); - test('.computehkdf() generates valid base64 encodable string', () { - final h = AuthenticationHelper('pool_name'); - final r = - h.computehkdf(utf8.encode('Password01'), utf8.encode('Salty Item')); - expect(base64.encode(r), equals('xqedift4s107XDR5zHZMHw==')); - }); - test('.calculateU() generates valid BigInt', () { - final h = AuthenticationHelper('pool_name'); - final a = BigInt.parse('aff001', radix: 16); - final b = BigInt.parse('bff002', radix: 16); - expect( - h.calculateU(a, b).toRadixString(16), - equals( - '1c3e2e616cd39a68b10c71ac12ce400798579792df1464e5519ff41446095a57')); - }); - test('.getPasswordAuthenticationKey() should return valid random base64', () { - final h = AuthenticationHelper('pool_name'); - final serverBValue = BigInt.parse('aff001', radix: 16); - final salt = BigInt.parse('bff002', radix: 16); - final hkdf = h.getPasswordAuthenticationKey( - 'see.saw@gmail.com', 'Password01!', serverBValue, salt); - expect(base64.encode(hkdf).length, equals(24)); - }); -} diff --git a/test/client_test.dart b/test/client_test.dart deleted file mode 100644 index 24c6ae0..0000000 --- a/test/client_test.dart +++ /dev/null @@ -1,147 +0,0 @@ -import 'dart:async'; - -import 'package:amazon_cognito_identity_dart_2/src/client.dart'; -import 'package:http/http.dart' as http; -import 'package:http/testing.dart'; -import 'package:test/test.dart'; - -void main() { - test('initiating Client should set default endpoint based on region', () { - final client = Client( - region: 'ap-southeast-1', - ); - expect(client.endpoint, - equals('https://cognito-idp.ap-southeast-1.amazonaws.com/')); - }); - - test('initiating Client with endpoint should use endpoint', () { - final client = Client( - endpoint: 'https://cognito-idp.custom-region.aws.com', - region: 'ap-southeaset-10', - ); - expect( - client.endpoint, equals('https://cognito-idp.custom-region.aws.com')); - }); - - group('requests', () { - final testClient = MockClient((request) { - switch (request.url.path) { - case '/200': - return Future.value(http.Response( - '{"it":"works"}', - 200, - headers: Map.from({ - 'Content-Type': 'application/json', - }), - )); - break; - case '/400_unknown_error': - return Future.value(http.Response('', 400)); - break; - case '/400___type': - return Future.value(http.Response( - '{"__type": "NotAuthorizedException", ' - '"message": "Logins don\'t match. Please include at least ' - 'one valid login for this identity or identity pool."}', - 400)); - break; - case '/400_x-amzn-ErrorType': - return Future.value(http.Response( - '{"message":"1 validation error detected: Value null at ' - '\'InstallS3Bucket\' failed to satisfy constraint: Member' - ' must not be null"}', - 400, - headers: Map.from({ - 'x-amzn-RequestId': 'b0e91dc8-3807-11e2-83c6-5912bf8ad066', - 'x-amzn-ErrorType': 'ValidationException', - 'Content-Type': 'application/json', - 'Content-Length': '124', - 'Date': 'Mon, 26 Nov 2012 20:27:25 GMT' - }))); - default: - return Future.value(http.Response('', 404)); - } - }); - test('200 OK should return data', () async { - final client = Client( - region: 'ap-southeast-1', - client: testClient, - ); - final paramsReq = { - 'color': 'Blue', - }; - final data = - await client.request('TestOperation', paramsReq, endpoint: '/200'); - expect(data['it'], equals('works')); - }); - test('400 unknown error throws default exception', () async { - final client = Client( - region: 'ap-southeast-1', - client: testClient, - ); - final paramsReq = { - 'color': 'Green', - }; - var data; - try { - data = await client.request('TestOperation', paramsReq, - endpoint: '/400_unknown_error'); - } catch (e) { - expect(e.code, equals('UnknownError')); - expect(e.name, equals('UnknownError')); - expect(e.statusCode, equals(400)); - expect(e.message, - equals('Cognito client request error with unknown message')); - } - expect(data, isNull); - }); - test('400 error __type throws exception with correct code', () async { - final client = Client( - region: 'ap-southeast-1', - client: testClient, - ); - final paramsReq = { - 'color': 'Green', - }; - var data; - try { - data = await client.request('TestOperation', paramsReq, - endpoint: '/400___type'); - } catch (e) { - expect(e.code, equals('NotAuthorizedException')); - expect(e.name, equals('NotAuthorizedException')); - expect(e.statusCode, equals(400)); - expect( - e.message, - equals('Logins don\'t match. Please include at least ' - 'one valid login for this identity or identity pool.')); - } - expect(data, isNull); - }); - test('400 x-amzn-ErrorType throws exception with correct code', () async { - final client = Client( - region: 'ap-southeast-1', - client: testClient, - ); - final paramsReq = { - 'color': 'Green', - }; - var data; - try { - data = await client.request('TestOperation', paramsReq, - endpoint: '/400_x-amzn-ErrorType'); - } catch (e) { - expect(e.code, equals('ValidationException')); - expect(e.name, equals('ValidationException')); - expect(e.statusCode, equals(400)); - expect( - e.message, - equals('1 validation error detected: Value null at ' - '\'InstallS3Bucket\' failed to satisfy constraint: Member' - ' must not be null')); - expect(e.statusCode, 400); - } - expect(data, isNull); - }); - }); -} diff --git a/test/cognito_id_token_test.dart b/test/cognito_id_token_test.dart deleted file mode 100644 index 0ad4400..0000000 --- a/test/cognito_id_token_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -import 'package:amazon_cognito_identity_dart_2/cognito.dart'; -import 'package:test/test.dart'; - -void main() { - final sampleJwt = '0.eyJzdWIiOiIxYzQyMWYwYy03ZmNlLTQ0MDEtOTVlYy' - '1lYzA1YTBjNzc0NDkiLCJldmVudF9pZCI6Ijk5NzQ5ODliLTRjNTAtM' - 'TFlOC04ZTcwLWQzNTEwZGY2NDY5YiIsInRva2VuX3VzZSI6ImFjY2Vz' - 'cyIsInNjb3BlIjoiYXdzLmNvZ25pdG8uc2lnbmluLnVzZXIuYWRtaW4' - 'iLCJhdXRoX3RpbWUiOjE1MjUwNzY5NjksImlzcyI6Imh0dHBzOlwvXC' - '9jb2duaXRvLWlkcC5hcC1zb3V0aGVhc3QtMS5hbWF6b25hd3MuY29tX' - 'C9hcC1zb3V0aGVhc3QtMV9LOGdUTmI2Zk8iLCJleHAiOjE1MjUwODA1' - 'NjksImlhdCI6MTUyNTA3Njk2OSwianRpIjoiNzIxNzFhYzctMTRiMS0' - '0OGQwLWFjM2MtMWY2ZmE1Njg2MzI1IiwiY2xpZW50X2lkIjoiM3N2Yj' - 'hmcTM4c2NpaWF0cDQ4c20ydjZzN2EiLCJ1c2VybmFtZSI6IjFjNDIxZ' - 'jBjLTdmY2UtNDQwMS05NWVjLWVjMDVhMGM3NzQ0OSJ9.2'; - test('initiating CognitoIdToken with token should decode payload', () { - var jwt = CognitoIdToken(sampleJwt); - expect(jwt.payload, isNotEmpty); - }); - test('.getExpiration() returns expiration', () { - var jwt = CognitoIdToken(sampleJwt); - expect(jwt.getExpiration(), greaterThan(0)); - }); - test('.getIssuedAt() returns issued at', () { - var jwt = CognitoIdToken(sampleJwt); - expect(jwt.getIssuedAt(), greaterThan(0)); - }); -} diff --git a/test/cognito_jwt_token_test.dart b/test/cognito_jwt_token_test.dart deleted file mode 100644 index 1103446..0000000 --- a/test/cognito_jwt_token_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -import 'package:amazon_cognito_identity_dart_2/cognito.dart'; -import 'package:test/test.dart'; - -void main() { - final sampleJwt = 'eyJraWQiOiJ3dzdRQWdvcmhGaXVqK09qcUdtXC9taWhITkFhMHRyR' - 'ThcL1wvSnNtWU94VG1ZPSIsImFsZyI6IlJTMjU2In0.eyJzdWIiOi' - 'IxYzQyMWYwYy03ZmNlLTQ0MDEtOTVlYy1lYzA1YTBjNzc0NDkiLCJ' - 'ldmVudF9pZCI6Ijk5NzQ5ODliLTRjNTAtMTFlOC04ZTcwLWQzNTEw' - 'ZGY2NDY5YiIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoiY' - 'XdzLmNvZ25pdG8uc2lnbmluLnVzZXIuYWRtaW4iLCJhdXRoX3RpbW' - 'UiOjE1MjUwNzY5NjksImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWl' - 'kcC5hcC1zb3V0aGVhc3QtMS5hbWF6b25hd3MuY29tXC9hcC1zb3V0' - 'aGVhc3QtMV9LOGdUTmI2Zk8iLCJleHAiOjE1MjUwODA1NjksImlhd' - 'CI6MTUyNTA3Njk2OSwianRpIjoiNzIxNzFhYzctMTRiMS00OGQwLW' - 'FjM2MtMWY2ZmE1Njg2MzI1IiwiY2xpZW50X2lkIjoiM3N2YjhmcTM' - '4c2NpaWF0cDQ4c20ydjZzN2EiLCJ1c2VybmFtZSI6IjFjNDIxZjBj' - 'LTdmY2UtNDQwMS05NWVjLWVjMDVhMGM3NzQ0OSJ9.UWDi4PDVxIkO' - 'SRW5ZqLnBNKoqhyBPCxIcVKzvuBZqTRKkLw4HxpW92GH-ADYJWD2X' - '-KFs2vc0HLK-CtQu9IjFwyHR57JQ0OPf_cq9DL8O610eoF2Kcaa6o' - 't1Xoc0YmP3ZYPTZ0UcP_ZXUDZ2Qa1lEeRnfEOFAOeq2uT_EhUOfas' - 'b7ufsxglb_UY2qy6T9ZfsiSX_ZSWp5LhE7wQym-l_R3eiDuX6DHxn' - 'SmsJyNyw6NCi6JLIF8_rQRCOyqzgLwdwfMfxs7uuIx-ZkpiX1wTBo' - 'pJpFyGslNkuImYt8O15lGjucGxEoGd3gE_bcbcvRHlqKPETpgJobz' - 'qUa7eE-Q27Mw'; - test('initiating CognitoJwtToken with token should decode payload', () { - var jwt = CognitoJwtToken(sampleJwt); - expect(jwt.payload, isNotEmpty); - }); - test('.getExpiration() returns expiration', () { - var jwt = CognitoJwtToken(sampleJwt); - expect(jwt.getExpiration(), greaterThan(0)); - }); - test('.getIssuedAt() returns issued at', () { - var jwt = CognitoJwtToken(sampleJwt); - expect(jwt.getIssuedAt(), greaterThan(0)); - }); -} diff --git a/test/cognito_user_attribute_test.dart b/test/cognito_user_attribute_test.dart deleted file mode 100644 index 11e9a1b..0000000 --- a/test/cognito_user_attribute_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -import 'dart:convert'; - -import 'package:amazon_cognito_identity_dart_2/cognito.dart'; -import 'package:test/test.dart'; - -void main() { - test('.toString() returns a string representation of the record', () { - var userAttribute = CognitoUserAttribute(name: 'name', value: 'Jon'); - expect(userAttribute.toString(), equals('{"Name":"name","Value":"Jon"}')); - }); - - test('.toJson() returns flat Map representing the record', () { - var userAttribute = CognitoUserAttribute(name: 'name', value: 'Jason'); - final attributeResult = { - 'Name': 'name', - 'Value': 'Jason', - }; - expect(userAttribute.toJson(), equals(attributeResult)); - }); - test('json.encode(userAttribute) returns valid JSON string', () { - var userAttribute = CognitoUserAttribute(name: 'name', value: 'Jeremy'); - expect( - json.encode(userAttribute), equals('{"Name":"name","Value":"Jeremy"}')); - }); - test('json.encode(List) returns valid JSON string', () { - final attributes = [ - CognitoUserAttribute(name: 'first_name', value: 'Josh'), - CognitoUserAttribute(name: 'last_name', value: 'Ong'), - ]; - expect( - json.encode(attributes), - equals( - '[{"Name":"first_name","Value":"Josh"},{"Name":"last_name","Value":"Ong"}]'), - ); - }); -} diff --git a/test/cognito_user_exceptions_test.dart b/test/cognito_user_exceptions_test.dart deleted file mode 100644 index 4c589de..0000000 --- a/test/cognito_user_exceptions_test.dart +++ /dev/null @@ -1,140 +0,0 @@ -import 'package:amazon_cognito_identity_dart_2/cognito.dart'; -import 'package:test/test.dart'; - -void main() { - test('throw CognitoUserNewPasswordRequiredException generates message', () { - final t = () => throw CognitoUserNewPasswordRequiredException(); - try { - t(); - } on CognitoUserNewPasswordRequiredException catch (e) { - expect( - e.toString(), equals('CognitoUserException: New Password required')); - } - try { - t(); - } on CognitoUserException catch (e) { - expect( - e.toString(), equals('CognitoUserException: New Password required')); - } - try { - t(); - } catch (e) { - expect( - e.toString(), equals('CognitoUserException: New Password required')); - } - }); - test('throw CognitoUserMfaRequiredException generates message', () { - final t = () => throw CognitoUserMfaRequiredException(); - try { - t(); - } on CognitoUserMfaRequiredException catch (e) { - expect(e.toString(), equals('CognitoUserException: "SMS_MFA"')); - } - try { - t(); - } on CognitoUserException catch (e) { - expect(e.toString(), equals('CognitoUserException: "SMS_MFA"')); - } - try { - t(); - } catch (e) { - expect(e.toString(), equals('CognitoUserException: "SMS_MFA"')); - } - }); - test('throw CognitoUserSelectMfaTypeException generates message', () { - final t = () => throw CognitoUserSelectMfaTypeException(); - try { - t(); - } on CognitoUserSelectMfaTypeException catch (e) { - expect(e.toString(), equals('CognitoUserException: "SELECT_MFA_TYPE"')); - } - try { - t(); - } on CognitoUserException catch (e) { - expect(e.toString(), equals('CognitoUserException: "SELECT_MFA_TYPE"')); - } - try { - t(); - } catch (e) { - expect(e.toString(), equals('CognitoUserException: "SELECT_MFA_TYPE"')); - } - }); - test('throw CognitoUserMfaSetupException generates message', () { - final t = () => throw CognitoUserMfaSetupException(); - try { - t(); - } on CognitoUserMfaSetupException catch (e) { - expect(e.toString(), equals('CognitoUserException: "MFA_SETUP"')); - } - try { - t(); - } on CognitoUserException catch (e) { - expect(e.toString(), equals('CognitoUserException: "MFA_SETUP"')); - } - try { - t(); - } catch (e) { - expect(e.toString(), equals('CognitoUserException: "MFA_SETUP"')); - } - }); - test('throw CognitoUserTotpRequiredException generates message', () { - final t = () => throw CognitoUserTotpRequiredException(); - try { - t(); - } on CognitoUserTotpRequiredException catch (e) { - expect( - e.toString(), equals('CognitoUserException: "SOFTWARE_TOKEN_MFA"')); - } - try { - t(); - } on CognitoUserException catch (e) { - expect( - e.toString(), equals('CognitoUserException: "SOFTWARE_TOKEN_MFA"')); - } - try { - t(); - } catch (e) { - expect( - e.toString(), equals('CognitoUserException: "SOFTWARE_TOKEN_MFA"')); - } - }); - test('throw CognitoUserCustomChallengeException generates message', () { - final t = () => throw CognitoUserCustomChallengeException(); - try { - t(); - } on CognitoUserCustomChallengeException catch (e) { - expect(e.toString(), equals('CognitoUserException: "CUSTOM_CHALLENGE"')); - } - try { - t(); - } on CognitoUserException catch (e) { - expect(e.toString(), equals('CognitoUserException: "CUSTOM_CHALLENGE"')); - } - try { - t(); - } catch (e) { - expect(e.toString(), equals('CognitoUserException: "CUSTOM_CHALLENGE"')); - } - }); - test('throw CognitoUserConfirmationNecessaryException generates message', () { - final t = () => throw CognitoUserConfirmationNecessaryException(); - try { - t(); - } on CognitoUserConfirmationNecessaryException catch (e) { - expect(e.toString(), - equals('CognitoUserException: User Confirmation Necessary')); - } - try { - t(); - } on CognitoUserException catch (e) { - expect(e.toString(), - equals('CognitoUserException: User Confirmation Necessary')); - } - try { - t(); - } catch (e) { - expect(e.toString(), - equals('CognitoUserException: User Confirmation Necessary')); - } - }); -} diff --git a/test/cognito_user_pool_test.dart b/test/cognito_user_pool_test.dart deleted file mode 100644 index 09f2335..0000000 --- a/test/cognito_user_pool_test.dart +++ /dev/null @@ -1,113 +0,0 @@ -import 'package:amazon_cognito_identity_dart_2/src/client.dart'; -import 'package:amazon_cognito_identity_dart_2/src/cognito_client_exceptions.dart'; -import 'package:amazon_cognito_identity_dart_2/src/cognito_user_pool.dart'; -import 'package:amazon_cognito_identity_dart_2/src/mocks/sign_up.dart' - as sign_up_mock; -import 'package:http/http.dart' as http; -import 'package:http/testing.dart'; -import 'package:test/test.dart'; - -void main() { - test('initiating with invalid userPoolId', () { - try { - CognitoUserPool('badUserPoolId', 'nnnnnnnnnnnnnnnnnnnnnnnnnn'); - } on ArgumentError catch (e) { - expect(e.message, equals('Invalid userPoolId format.')); - } - }); - - test('initiating with invalid userPoolId throws ArgumentError', () { - try { - CognitoUserPool('badUserPoolId', 'nnnnnnnnnnnnnnnnnnnnnnnnnn'); - } on ArgumentError catch (e) { - expect(e.message, equals('Invalid userPoolId format.')); - } - }); - - test('initiating with valid userPoolId sets up client', () { - final cup = CognitoUserPool( - 'ap-southeast-1_nnnnnnnnn', 'nnnnnnnnnnnnnnnnnnnnnnnnnn'); - expect( - cup.client!.endpoint, - equals('https://cognito-idp.ap-southeast-1.amazonaws.com/'), - ); - }); - - test('initiating with custom client', () async { - final testClient = MockClient((request) { - return Future.value(http.Response( - '{"it":"works"}', - 200, - headers: Map.from({ - 'Content-Type': 'application/json', - }), - )); - }); - - final c = Client( - client: testClient, - ); - - final cup = CognitoUserPool( - 'ap-southeast-1_nnnnnnnnn', - 'nnnnnnnnnnnnnnnnnnnnnnnnnn', - customClient: c, - ); - final Map data = - await cup.client!.request('TestOperation', { - 'color': 'Green', - }); - expect(data['it'], equals('works')); - }); - - group('signUp', () { - test('successful confirmed signup', () async { - final c = Client( - client: MockClient((request) => Future.value( - sign_up_mock.successfulConfirmedSignUp)), - ); - final cup = CognitoUserPool( - 'ap-southeast-1_nnnnnnnnn', - 'nnnnnnnnnnnnnnnnnnnnnnnnnn', - customClient: c, - ); - final data = await cup.signUp('username', 'password'); - expect(data.userConfirmed, equals(true)); - expect(data.userSub, equals('XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX')); - }); - - test('successful unconfirmed signup', () async { - final c = Client( - client: MockClient((request) => Future.value( - sign_up_mock.successfulUnconfirmedSignUp)), - ); - final cup = CognitoUserPool( - 'ap-southeast-1_nnnnnnnnn', - 'nnnnnnnnnnnnnnnnnnnnnnnnnn', - customClient: c, - ); - final data = await cup.signUp('username', 'password'); - expect(data.userConfirmed, equals(false)); - expect(data.userSub, equals('XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX')); - }); - - test('unsuccessful', () async { - final c = Client( - client: MockClient((request) => Future.value( - sign_up_mock.notAuthorizedException, - )), - ); - final cup = CognitoUserPool( - 'ap-southeast-1_nnnnnnnnn', - 'nnnnnnnnnnnnnnnnnnnnnnnnnn', - customClient: c, - ); - try { - await cup.signUp('username', 'password'); - } on CognitoClientException catch (e) { - expect(e.code, equals('NotAuthorizedException')); - expect(e.message, isNotEmpty); - } - }); - }); -} diff --git a/test/date_helper_test.dart b/test/date_helper_test.dart deleted file mode 100644 index 0623411..0000000 --- a/test/date_helper_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -import 'package:amazon_cognito_identity_dart_2/src/date_helper.dart'; -import 'package:test/test.dart'; - -void main() { - test('.getNowString() starts with short day', () { - final dateHelper = DateHelper(); - expect(dateHelper.getNowString(), - matches(r'^(Sun|Mon|Tue|Wed|Thu|Fri|Sat)\s')); - }); - test('.getNowString() includes short month', () { - final dateHelper = DateHelper(); - expect(dateHelper.getNowString(), - matches(r'\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s')); - }); - test('.getNowString() includes day', () { - final dateHelper = DateHelper(); - expect(dateHelper.getNowString(), matches(r'\s([1-9]|[12]\d|3[01])\s')); - }); - test('.getNowString() includes time', () { - final dateHelper = DateHelper(); - expect(dateHelper.getNowString(), - matches(r'\s([01]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])\s')); - }); - test('.getNowString() includes UTC', () { - final dateHelper = DateHelper(); - expect(dateHelper.getNowString(), matches(r'\sUTC\s')); - }); - test('.getNowString() ends with Year', () { - final dateHelper = DateHelper(); - expect(dateHelper.getNowString(), matches(r'\d{4}$')); - }); - test('.getNowString() generates valid timestamp', () { - final dateHelper = DateHelper(); - expect( - dateHelper.getNowString(), - matches(r'^[SMTWF][uoehra][neduit]\s' - r'[JFMASOND][aepuco][nbrylgptvc]\s' - r'([1-9]|[12]\d|3[01])\s' - r'([01]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])\s' - r'UTC\s\d{4}$')); - }); -} diff --git a/test/random_string_helper_test.dart b/test/random_string_helper_test.dart deleted file mode 100644 index 6611ac7..0000000 --- a/test/random_string_helper_test.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:amazon_cognito_identity_dart_2/src/random_string_helper.dart'; -import 'package:test/test.dart'; - -void main() { - test('.generates() generates correct length', () { - expect(RandomString().generate(length: 16).length, equals(16)); - }); - test('.generates() generates with default hex chars', () { - expect(RandomString().generate(), contains(RegExp(r'[0-9a-f]*'))); - }); -} diff --git a/test/sig_v4_helper_test.dart b/test/sig_v4_helper_test.dart deleted file mode 100644 index b0a72e6..0000000 --- a/test/sig_v4_helper_test.dart +++ /dev/null @@ -1,185 +0,0 @@ -import 'dart:convert'; - -import 'package:amazon_cognito_identity_dart_2/sig_v4.dart'; -import 'package:convert/convert.dart'; -import 'package:test/test.dart'; - -void main() { - test('.hash() generates valid hash', () { - expect( - hex.encode(SigV4.hash(utf8.encode('{"one":1}'))), - equals( - '335929a4e59b0860ec04c620c1284dace74c00f7eadaadce7a18d6deba6c544e')); - }); - test('.buildCanonicalQueryString() builds valid query string', () { - final params = { - 'One': '1', - 'Two': '1 + 1', - 'Three': '3', - }; - expect(SigV4.buildCanonicalQueryString(params), - equals('One=1&Three=3&Two=1%20%2B%201')); - }); - test('.buildCanonicalHeaders() builds canonical header', () { - final headers = { - 'Header-2': 'head 002', - 'header-1': 'head 001', - }; - expect(SigV4.buildCanonicalHeaders(headers), - equals('header-1:head 001\nheader-2:head 002\n')); - }); - test('.buildCanonicalSignedHeaders() builds canonical header', () { - final headers = { - 'Header-2': 'head 002', - 'header-1': 'head 001', - }; - expect(SigV4.buildCanonicalSignedHeaders(headers), - equals('header-1;header-2')); - }); - test('.buildCanonicalRequest() builds canonical request', () { - final canonicalReq = SigV4.buildCanonicalRequest( - 'POST', - '/dev/projects/123', - Map.from({ - 'color': 'orange red', - }), - Map.from({ - 'header-1': 'one', - 'header-2': 'two', - 'Content-Type': 'application/json', - 'Accept': 'application/json', - 'x-amz-date': '20180515T011950Z', - 'host': 'api.inspire.my' - }), - '{"color":"green"}'); - expect( - canonicalReq, - equals('POST\n' - '/dev/projects/123\n' - 'color=orange%20red\n' - 'accept:application/json\n' - 'content-type:application/json\n' - 'header-1:one\n' - 'header-2:two\n' - 'host:api.inspire.my\n' - 'x-amz-date:20180515T011950Z\n' - '\n' - 'accept;content-type;header-1;header-2;host;x-amz-date\n' - 'b1c0d2a81c6839b36839e8d9b273cb17279370ab430e5e3fc8218e2bcaa6373b')); - }); - test('.buildCredentialScope() builds credential scope', () { - final credentialScope = SigV4.buildCredentialScope( - '20180515T011950Z', 'ap-southeast-1', 'execute-api'); - expect(credentialScope, - equals('20180515/ap-southeast-1/execute-api/aws4_request')); - }); - test('.buildStringToSign(), builds signed string', () { - final hashedCanonicalRequest = SigV4.buildCanonicalRequest( - 'POST', - '/dev/projects/123', - Map.from({ - 'color': 'orange red', - }), - Map.from({ - 'header-1': 'one', - 'header-2': 'two', - 'Content-Type': 'application/json', - 'Accept': 'application/json', - 'x-amz-date': '20180515T011950Z', - 'host': 'api.inspire.my', - }), - '{"color":"green"}'); - final credentialScope = SigV4.buildCredentialScope( - '20180515T011950Z', 'ap-southeast-1', 'execute-api'); - final stringToSign = SigV4.buildStringToSign( - '20180515T011950Z', credentialScope, hashedCanonicalRequest); - expect( - stringToSign, - equals('AWS4-HMAC-SHA256\n' - '20180515T011950Z\n' - '20180515/ap-southeast-1/execute-api/aws4_request\n' - 'POST\n' - '/dev/projects/123\n' - 'color=orange%20red\n' - 'accept:application/json\n' - 'content-type:application/json\n' - 'header-1:one\n' - 'header-2:two\n' - 'host:api.inspire.my\n' - 'x-amz-date:20180515T011950Z\n' - '\n' - 'accept;content-type;header-1;header-2;host;x-amz-date\n' - 'b1c0d2a81c6839b36839e8d9b273cb17279370ab430e5e3fc8218e2bcaa6373b')); - }); - test('.calculateSignature() returns valid signature', () { - final stringToSign = 'AWS4-HMAC-SHA256\n' - '20180515T011950Z\n' - '20180515/ap-southeast-1/execute-api/aws4_request\n' - 'POST\n' - '/dev/projects/123\n' - 'color=orange%20red\n' - 'accept:application/json\n' - 'content-type:application/json\n' - 'header-1:one\n' - 'header-2:two\n' - 'host:api.inspire.my\n' - 'x-amz-date:20180515T011950Z\n' - '\n' - 'accept;content-type;header-1;header-2;host;x-amz-date\n' - 'b1c0d2a81c6839b36839e8d9b273cb17279370ab430e5e3fc8218e2bcaa6373b'; - final signingKey = SigV4.calculateSigningKey( - '000000000000000000000000/000000000000000', - '20180515T011950Z', - 'ap-southeast-1', - 'execute-api'); - final signature = SigV4.calculateSignature(signingKey, stringToSign); - expect( - signature, - equals( - '6fe6cf9ba017c591fc404eb9883442355bde3c61233e5f1f7ea8ea38a80070df')); - }); - test('.buildAuthorizationHeader() builds authorization header', () { - final credentialScope = SigV4.buildCredentialScope( - '20180515T011950Z', 'ap-southeast-1', 'execute-api'); - final authHeader = SigV4.buildAuthorizationHeader( - 'AXXXXXXXXXXXXXXXXXXX', - credentialScope, - { - 'header-1': 'one', - 'header-2': 'two', - 'accept': 'application/json', - 'content-type': 'application/json', - 'x-amz-date': '20180515T011950Z', - 'host': 'api.inspire.my' - }, - '6fe6cf9ba017c591fc404eb9883442355bde3c61233e5f1f7ea8ea38a80070df'); - expect( - authHeader, - equals('AWS4-HMAC-SHA256 ' - 'Credential=AXXXXXXXXXXXXXXXXXXX/20180515/ap-southeast-1/execute-api/aws4_request, ' - 'SignedHeaders=accept;content-type;header-1;header-2;host;x-amz-date, ' - 'Signature=6fe6cf9ba017c591fc404eb9883442355bde3c61233e5f1f7ea8ea38a80070df')); - }); - test('new SigV4Request generates signed headers and url', () { - const endpoint = 'https://api.inspire.my/dev'; - final awsSigV4Client = AwsSigV4Client('AXXXXXXXXXXXXXXXXXXX', - '000000000000000000000000/000000000000000', endpoint, - sessionToken: 'session-token', region: 'ap-southeast-1'); - final signedRequest = SigV4Request(awsSigV4Client, - method: 'POST', - path: '/projects/123', - datetime: '20180515T011950Z', - headers: - Map.from({'header-1': 'one', 'header-2': 'two'}), - queryParams: Map.from({'color': 'orange red'}), - body: Map.from({'color': 'blue'})); - expect( - signedRequest.url, equals('$endpoint/projects/123?color=orange%20red')); - expect( - signedRequest.headers!['Authorization'], - equals('AWS4-HMAC-SHA256 ' - 'Credential=AXXXXXXXXXXXXXXXXXXX/20180515/ap-southeast-1/execute-api/aws4_request, ' - 'SignedHeaders=accept;content-type;header-1;header-2;host;x-amz-date, ' - 'Signature=a51f0890d0bbbbc1fede3511c0f6448bdeb75623767859b73730ec728f104253')); - }); -} diff --git a/test/storage_helper_test.dart b/test/storage_helper_test.dart deleted file mode 100644 index 1fb734c..0000000 --- a/test/storage_helper_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -import 'package:amazon_cognito_identity_dart_2/cognito.dart'; -import 'package:test/test.dart'; - -import 'test_storage.dart'; - -void main() { - group('CognitoMemoryStorage', () { - test('new CognitoStorageHelper() sets up default CognitoMemoryStorage', () { - final s = CognitoStorageHelper(CognitoMemoryStorage()); - expect(s.getStorage(), TypeMatcher()); - }); - test('.getItem() returns default null', () async { - final s = CognitoStorageHelper(CognitoMemoryStorage()).getStorage(); - expect(await s.getItem('some'), equals(null)); - }); - test('.setItem() sets up item in memory & .getItem() retrieves item', - () async { - final s = CognitoStorageHelper(CognitoMemoryStorage()).getStorage(); - await s.setItem('some', 'value'); - expect(await s.getItem('some'), equals('value')); - }); - test('.getItem() retrieves item from previous storage', () async { - final s = CognitoStorageHelper(CognitoMemoryStorage()).getStorage(); - expect(await s.getItem('some'), equals('value')); - }); - test('.removeItem() returns item and removes from storage', () async { - final s = CognitoStorageHelper(CognitoMemoryStorage()).getStorage(); - await s.setItem('another', 'awesome value'); - final removedItem = await s.removeItem('another'); - expect(removedItem, equals('awesome value')); - expect(await s.getItem('another'), equals(null)); - }); - test('.clear() clears storage', () async { - final s = CognitoStorageHelper(CognitoMemoryStorage()).getStorage(); - await s.clear(); - expect(await s.getItem('some'), equals(null)); - }); - }); - group('custom storage', () { - test('new CognitoStorageHelper() sets up default TestCustomStorage', () { - final s = CognitoStorageHelper(TestCustomStorage('test:')); - expect(s.getStorage(), TypeMatcher()); - }); - test('.setItem() sets up json value with custom prefixed key', () async { - final s = CognitoStorageHelper(TestCustomStorage('test:')).getStorage(); - final params = { - 'username': 'x123', - 'name': 'Michael', - }; - await s.setItem('user', params); - expect(testStorage['test:user'], - equals('{"username":"x123","name":"Michael"}')); - }); - test('.getItem() gets item with decoded values', () async { - final s = CognitoStorageHelper(TestCustomStorage('test:')).getStorage(); - final user = await s.getItem('user'); - expect(user['username'], equals('x123')); - expect(user['name'], equals('Michael')); - }); - }); -} diff --git a/test/test_storage.dart b/test/test_storage.dart deleted file mode 100644 index 7e3d1a5..0000000 --- a/test/test_storage.dart +++ /dev/null @@ -1,33 +0,0 @@ -import 'dart:convert'; - -import 'package:amazon_cognito_identity_dart_2/cognito.dart'; - -Map testStorage = {}; - -class TestCustomStorage extends CognitoStorage { - String prefix; - TestCustomStorage(this.prefix); - @override - Future setItem(String key, value) async { - testStorage[prefix + key] = json.encode(value); - return testStorage[prefix + key]; - } - - @override - Future getItem(String key) async { - if (testStorage[prefix + key] != null) { - return json.decode(testStorage[prefix + key]!); - } - return null; - } - - @override - Future removeItem(String key) async { - return testStorage.remove(prefix + key); - } - - @override - Future clear() async { - testStorage = {}; - } -} From 56f5e9d772d468423e10b65b84c34f7d20ece7e2 Mon Sep 17 00:00:00 2001 From: Paulo Henrique Nonaka Date: Mon, 22 Mar 2021 15:02:22 -0300 Subject: [PATCH 6/6] fixes to null safety migration --- lib/src/authentication_helper.dart | 20 +-- lib/src/client.dart | 11 +- lib/src/cognito_identity_id.dart | 15 +- lib/src/cognito_user.dart | 220 ++++++++++------------------- lib/src/cognito_user_pool.dart | 25 ++-- 5 files changed, 102 insertions(+), 189 deletions(-) diff --git a/lib/src/authentication_helper.dart b/lib/src/authentication_helper.dart index 1d7d01c..07a6649 100644 --- a/lib/src/authentication_helper.dart +++ b/lib/src/authentication_helper.dart @@ -22,8 +22,7 @@ final String initN = 'FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1' 'BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31' '43DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF'; -final String _newPasswordRequiredChallengeUserAttributePrefix = - 'userAttributes.'; +final String _newPasswordRequiredChallengeUserAttributePrefix = 'userAttributes.'; class AuthenticationHelper { String? poolName; @@ -80,8 +79,7 @@ class AuthenticationHelper { } /// Calculates the final hkdf based on computed S value, and computed U value and the key - List getPasswordAuthenticationKey( - String? username, String? password, BigInt serverBValue, BigInt salt) { + List getPasswordAuthenticationKey(String? username, String? password, BigInt serverBValue, BigInt salt) { if (serverBValue % N! == BigInt.zero) { throw ArgumentError('B cannot be zero.'); } @@ -92,12 +90,10 @@ class AuthenticationHelper { final usernamePassword = '$poolName$username:$password'; final usernamePasswordHash = hash(utf8.encode(usernamePassword)); - final xValue = - BigInt.parse(hexHash(padHex(salt) + usernamePasswordHash), radix: 16); + final xValue = BigInt.parse(hexHash(padHex(salt) + usernamePasswordHash), radix: 16); final sValue = calculateS(xValue, serverBValue); - final hkdf = - computehkdf(hex.decode(padHex(sValue)), hex.decode(padHex(_uValue!))); + final hkdf = computehkdf(hex.decode(padHex(sValue)), hex.decode(padHex(_uValue!))); return hkdf; } @@ -139,7 +135,7 @@ class AuthenticationHelper { /// Calculate a hash from a bitArray String hash(List buf) { final hashHex = sha256.convert(buf).toString(); - return (List(64 - hashHex.length).join('0')) + hashHex; + return (List.filled(64 - hashHex.length, null, growable: false).join('0')) + hashHex; } /// Calculate a hash from a hex string @@ -199,8 +195,7 @@ class AuthenticationHelper { List computehkdf(List ikm, List salt) { final hmac1 = Hmac(sha256, salt); final prk = hmac1.convert(ikm); - final infoBitsUpdate = List.from(_infoBits) - ..addAll(utf8.encode(String.fromCharCode(1))); + final infoBitsUpdate = List.from(_infoBits)..addAll(utf8.encode(String.fromCharCode(1))); final hmac2 = Hmac(sha256, prk.bytes); final dig = hmac2.convert(infoBitsUpdate); return dig.bytes.getRange(0, 16).toList(); @@ -239,8 +234,7 @@ class AuthenticationHelper { if (negative) { final toReplace = output[0]; output = output.substring(1); - final updatedLeadingDigit = - (int.parse(toReplace) | 0x8).toRadixString(16); + final updatedLeadingDigit = (int.parse(toReplace) | 0x8).toRadixString(16); output = updatedLeadingDigit + output; } return output; diff --git a/lib/src/client.dart b/lib/src/client.dart index 2a27b8c..704fe2c 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -26,29 +26,28 @@ class Client { } /// Makes requests on AWS API service provider - dynamic request(String operation, Map params, - {String? endpoint, String? service}) async { + dynamic request(String operation, Map params, {String? endpoint, String? service}) async { final endpointReq = endpoint ?? this.endpoint!; final targetService = service ?? _service; final body = json.encode(params); - final headersReq = { + final Map? headersReq = { 'Content-Type': 'application/x-amz-json-1.1', 'X-Amz-Target': '$targetService.$operation', - 'X-Amz-User-Agent': _userAgent, + 'X-Amz-User-Agent': _userAgent ?? '', }; http.Response response; try { response = await _client.post( Uri.parse(endpointReq), - headers: headersReq as Map?, + headers: headersReq, body: body, ); } catch (e) { if (e.toString().startsWith('SocketException:')) { throw CognitoClientException( - e.message, + e.toString(), code: 'NetworkError', ); } diff --git a/lib/src/cognito_identity_id.dart b/lib/src/cognito_identity_id.dart index 8ccfdb6..b3abb6f 100644 --- a/lib/src/cognito_identity_id.dart +++ b/lib/src/cognito_identity_id.dart @@ -14,15 +14,13 @@ class CognitoIdentityId { final String? _token; Map? _loginParam; - CognitoIdentityId(this._identityPoolId, this._pool, - {String? authenticator, String? token}) + CognitoIdentityId(this._identityPoolId, this._pool, {String? authenticator, String? token}) : _region = _pool.getRegion(), _client = _pool.client, _identityIdKey = 'aws.cognito.identity-id.$_identityPoolId', _token = token, - _authenticator = authenticator ?? - 'cognito-idp.${_pool.getRegion()}.amazonaws.com/${_pool.getUserPoolId()}' { - if (_token != null && _authenticator != null) { + _authenticator = authenticator ?? 'cognito-idp.${_pool.getRegion()}.amazonaws.com/${_pool.getUserPoolId()}' { + if (_token != null) { _loginParam = { _authenticator: _token, }; @@ -32,7 +30,7 @@ class CognitoIdentityId { Map? get loginParam => _loginParam; Future getIdentityId() async { - String? identityId = await (_pool.storage!.getItem(_identityIdKey) as FutureOr); + var identityId = await (_pool.storage!.getItem(_identityIdKey)); if (identityId != null) { this.identityId = identityId; return identityId; @@ -45,8 +43,7 @@ class CognitoIdentityId { } final data = await _client!.request('GetId', paramsReq, - service: 'AWSCognitoIdentityService', - endpoint: 'https://cognito-identity.$_region.amazonaws.com/'); + service: 'AWSCognitoIdentityService', endpoint: 'https://cognito-identity.$_region.amazonaws.com/'); this.identityId = data['IdentityId']; await _pool.storage!.setItem(_identityIdKey, this.identityId); @@ -57,6 +54,6 @@ class CognitoIdentityId { /// Remove AWS Identity Id from storage Future removeIdentityId() async { final identityIdKey = 'aws.cognito.identity-id.$_identityPoolId'; - return await (_pool.storage!.removeItem(identityIdKey) as FutureOr); + return await (_pool.storage!.removeItem(identityIdKey)); } } diff --git a/lib/src/cognito_user.dart b/lib/src/cognito_user.dart index 1921f3a..6b509df 100644 --- a/lib/src/cognito_user.dart +++ b/lib/src/cognito_user.dart @@ -53,8 +53,7 @@ class CognitoUser { signInUserSession, }) { if (clientSecret != null) { - _clientSecretHash = - calculateClientSecretHash(username!, pool.getClientId()!, clientSecret); + _clientSecretHash = calculateClientSecretHash(username!, pool.getClientId()!, clientSecret); } if (signInUserSession != null) { _signInUserSession = signInUserSession; @@ -62,8 +61,7 @@ class CognitoUser { client = pool.client; authenticationFlowType = 'USER_SRP_AUTH'; - storage = - storage ?? (CognitoStorageHelper(CognitoMemoryStorage())).getStorage(); + storage = storage ?? (CognitoStorageHelper(CognitoMemoryStorage())).getStorage(); } Future _authenticateUserInternal( @@ -73,30 +71,22 @@ class CognitoUser { if (challengeName == 'SMS_MFA') { _session = dataAuthenticate['Session']; - throw CognitoUserMfaRequiredException( - challengeName: challengeName, - challengeParameters: challengeParameters); + throw CognitoUserMfaRequiredException(challengeName: challengeName, challengeParameters: challengeParameters); } if (challengeName == 'SELECT_MFA_TYPE') { _session = dataAuthenticate['Session']; - throw CognitoUserSelectMfaTypeException( - challengeName: challengeName, - challengeParameters: challengeParameters); + throw CognitoUserSelectMfaTypeException(challengeName: challengeName, challengeParameters: challengeParameters); } if (challengeName == 'MFA_SETUP') { _session = dataAuthenticate['Session']; - throw CognitoUserMfaSetupException( - challengeName: challengeName, - challengeParameters: challengeParameters); + throw CognitoUserMfaSetupException(challengeName: challengeName, challengeParameters: challengeParameters); } if (challengeName == 'SOFTWARE_TOKEN_MFA') { _session = dataAuthenticate['Session']; - throw CognitoUserTotpRequiredException( - challengeName: challengeName, - challengeParameters: challengeParameters); + throw CognitoUserTotpRequiredException(challengeName: challengeName, challengeParameters: challengeParameters); } if (challengeName == 'CUSTOM_CHALLENGE') { @@ -109,27 +99,22 @@ class CognitoUser { await getDeviceResponse(); return _signInUserSession; } - _signInUserSession = - getCognitoUserSession(dataAuthenticate['AuthenticationResult']); + _signInUserSession = getCognitoUserSession(dataAuthenticate['AuthenticationResult']); await cacheTokens(); - final newDeviceMetadata = - dataAuthenticate['AuthenticationResult']['NewDeviceMetadata']; + final newDeviceMetadata = dataAuthenticate['AuthenticationResult']['NewDeviceMetadata']; if (newDeviceMetadata == null) { return _signInUserSession; } authenticationHelper.generateHashDevice( - dataAuthenticate['AuthenticationResult']['NewDeviceMetadata'] - ['DeviceGroupKey'], - dataAuthenticate['AuthenticationResult']['NewDeviceMetadata'] - ['DeviceKey'], + dataAuthenticate['AuthenticationResult']['NewDeviceMetadata']['DeviceGroupKey'], + dataAuthenticate['AuthenticationResult']['NewDeviceMetadata']['DeviceKey'], ); final deviceSecretVerifierConfig = { 'Salt': base64.encode(hex.decode(authenticationHelper.getSaltDevices()!)), - 'PasswordVerifier': - base64.encode(hex.decode(authenticationHelper.getVerifierDevices()!)) + 'PasswordVerifier': base64.encode(hex.decode(authenticationHelper.getVerifierDevices()!)) }; verifierDevices = deviceSecretVerifierConfig['PasswordVerifier']; @@ -143,16 +128,13 @@ class CognitoUser { 'DeviceName': deviceName, }; - final dataConfirm = - await client!.request('ConfirmDevice', paramsConfirmDevice); + final dataConfirm = await client!.request('ConfirmDevice', paramsConfirmDevice); - _deviceKey = dataAuthenticate['AuthenticationResult']['NewDeviceMetadata'] - ['DeviceKey']; + _deviceKey = dataAuthenticate['AuthenticationResult']['NewDeviceMetadata']['DeviceKey']; await cacheDeviceKeyAndPassword(); if (dataConfirm['UserConfirmationNecessary'] == true) { - throw CognitoUserConfirmationNecessaryException( - signInUserSession: _signInUserSession); + throw CognitoUserConfirmationNecessaryException(signInUserSession: _signInUserSession); } return _signInUserSession; } @@ -168,20 +150,17 @@ class CognitoUser { return _signInUserSession; } - final keyPrefix = - 'CognitoIdentityServiceProvider.${pool.getClientId()}.$username'; + final keyPrefix = 'CognitoIdentityServiceProvider.${pool.getClientId()}.$username'; final idTokenKey = '$keyPrefix.idToken'; final accessTokenKey = '$keyPrefix.accessToken'; final refreshTokenKey = '$keyPrefix.refreshToken'; final clockDriftKey = '$keyPrefix.clockDrift'; if (await storage!.getItem(idTokenKey) != null) { - final idToken = CognitoIdToken(await (storage!.getItem(idTokenKey) as FutureOr)); - final accessToken = - CognitoAccessToken(await (storage!.getItem(accessTokenKey) as FutureOr)); - final refreshToken = - CognitoRefreshToken(await (storage!.getItem(refreshTokenKey) as FutureOr)); - final clockDrift = int.parse(await (storage!.getItem(clockDriftKey) as FutureOr)) ?? 0; + final idToken = CognitoIdToken(await (storage!.getItem(idTokenKey))); + final accessToken = CognitoAccessToken(await (storage!.getItem(accessTokenKey))); + final refreshToken = CognitoRefreshToken(await (storage!.getItem(refreshTokenKey))); + final clockDrift = int.parse(await (storage!.getItem(clockDriftKey))); final cachedSession = CognitoUserSession( idToken, @@ -201,8 +180,7 @@ class CognitoUser { return refreshSession(refreshToken); } - throw Exception( - 'Local storage is missing an ID Token, Please authenticate'); + throw Exception('Local storage is missing an ID Token, Please authenticate'); } /// This is used to initiate an attribute confirmation request @@ -236,8 +214,7 @@ class CognitoUser { } /// This uses the refreshToken to retrieve a new session - Future refreshSession( - CognitoRefreshToken refreshToken) async { + Future refreshSession(CognitoRefreshToken refreshToken) async { final authParameters = { 'REFRESH_TOKEN': refreshToken.getToken(), }; @@ -245,9 +222,9 @@ class CognitoUser { final lastUserKey = '$keyPrefix.LastAuthUser'; if (await storage!.getItem(lastUserKey) != null) { - username = await (storage!.getItem(lastUserKey) as FutureOr); + username = await (storage!.getItem(lastUserKey)); final deviceKeyKey = '$keyPrefix.$username.deviceKey'; - _deviceKey = await (storage!.getItem(deviceKeyKey) as FutureOr); + _deviceKey = await (storage!.getItem(deviceKeyKey)); authParameters['DEVICE_KEY'] = _deviceKey; if (_clientSecretHash != null) { authParameters['SECRET_HASH'] = _clientSecretHash; @@ -303,33 +280,30 @@ class CognitoUser { } void getCachedDeviceKeyAndPassword() async { - final keyPrefix = - 'CognitoIdentityServiceProvider.${pool.getClientId()}.$username'; + final keyPrefix = 'CognitoIdentityServiceProvider.${pool.getClientId()}.$username'; final deviceKeyKey = '$keyPrefix.deviceKey'; final randomPasswordKey = '$keyPrefix.randomPasswordKey'; final deviceGroupKeyKey = '$keyPrefix.deviceGroupKey'; if (await storage!.getItem(deviceKeyKey) != null) { - _deviceKey = await (storage!.getItem(deviceKeyKey) as FutureOr); - _deviceGroupKey = await (storage!.getItem(deviceGroupKeyKey) as FutureOr); - _randomPassword = await (storage!.getItem(randomPasswordKey) as FutureOr); + _deviceKey = await (storage!.getItem(deviceKeyKey)); + _deviceGroupKey = await (storage!.getItem(deviceGroupKeyKey)); + _randomPassword = await (storage!.getItem(randomPasswordKey)); } } - void cacheUserSession() async { - final keyPrefix = - 'CognitoIdentityServiceProvider.${pool.getClientId()}.$username'; + Future cacheUserSession() async { + final keyPrefix = 'CognitoIdentityServiceProvider.${pool.getClientId()}.$username'; final userSessionKey = '$keyPrefix.userSessionKey'; await storage!.setItem(userSessionKey, _session); } - void getCachedUserSession() async { - final keyPrefix = - 'CognitoIdentityServiceProvider.${pool.getClientId()}.$username'; + Future getCachedUserSession() async { + final keyPrefix = 'CognitoIdentityServiceProvider.${pool.getClientId()}.$username'; final userSessionKey = '$keyPrefix.userSessionKey'; if (await storage!.getItem(userSessionKey) != null) { - _session = await (storage!.getItem(userSessionKey) as FutureOr); + _session = await (storage!.getItem(userSessionKey)); } } @@ -376,12 +350,10 @@ class CognitoUser { final data = await client!.request('RespondToAuthChallenge', params); final challengeParameters = data['ChallengeParameters']; final serverBValue = BigInt.parse(challengeParameters['SRP_B'], radix: 16); - final saltString = - authenticationHelper.toUnsignedHex(challengeParameters['SALT']); + final saltString = authenticationHelper.toUnsignedHex(challengeParameters['SALT']); final salt = BigInt.parse(saltString, radix: 16); - final hkdf = authenticationHelper.getPasswordAuthenticationKey( - _deviceKey, _randomPassword, serverBValue, salt); + final hkdf = authenticationHelper.getPasswordAuthenticationKey(_deviceKey, _randomPassword, serverBValue, salt); final dateNow = dateHelper.getNowString(); @@ -418,20 +390,16 @@ class CognitoUser { paramsResp['UserContextData'] = getUserContextData(); } - final dataAuthenticate = - await client!.request('RespondToAuthChallenge', paramsResp); + final dataAuthenticate = await client!.request('RespondToAuthChallenge', paramsResp); - _signInUserSession = - getCognitoUserSession(dataAuthenticate['AuthenticationResult']); + _signInUserSession = getCognitoUserSession(dataAuthenticate['AuthenticationResult']); await cacheTokens(); return _signInUserSession; } /// This is used for authenticating the user through the custom authentication flow. - Future initiateAuth( - AuthenticationDetails authDetails) async { - final authParameters = - authDetails.getAuthParameters()!.fold({}, (dynamic value, element) { + Future initiateAuth(AuthenticationDetails authDetails) async { + final authParameters = authDetails.getAuthParameters()!.fold({}, (dynamic value, element) { value[element.name] = element.value; return value; }); @@ -458,8 +426,7 @@ class CognitoUser { final challengeParameters = data['ChallengeParameters']; if (challengeName == 'CUSTOM_CHALLENGE') { _session = data['Session']; - throw CognitoUserCustomChallengeException( - challengeParameters: challengeParameters); + throw CognitoUserCustomChallengeException(challengeParameters: challengeParameters); } _signInUserSession = getCognitoUserSession(data['AuthenticationResult']); @@ -469,8 +436,7 @@ class CognitoUser { } /// This is used for authenticating the user. - Future authenticateUser( - AuthenticationDetails authDetails) async { + Future authenticateUser(AuthenticationDetails authDetails) async { if (authenticationFlowType == 'USER_PASSWORD_AUTH') { return await _authenticateUserPlainUsernamePassword(authDetails); } else if (authenticationFlowType == 'USER_SRP_AUTH') { @@ -488,7 +454,7 @@ class CognitoUser { pool.getUserPoolId()!.split('_')[1], ); - Map authParameters = {}; + var authParameters = {}; if (_deviceKey != null) { authParameters['DEVICE_KEY'] = _deviceKey; } @@ -498,7 +464,7 @@ class CognitoUser { authParameters['SRP_A'] = srpA.toRadixString(16); authParameters['CHALLENGE_NAME'] = 'SRP_A'; // Verifies username - Map params = { + var params = { 'AuthFlow': authenticationFlowType, 'ClientId': pool.getClientId(), 'AuthParameters': authParameters, @@ -532,8 +498,7 @@ class CognitoUser { await clearCachedTokens(); } - Future _authenticateUserPlainUsernamePassword( - AuthenticationDetails authDetails) async { + Future _authenticateUserPlainUsernamePassword(AuthenticationDetails authDetails) async { final authParameters = { 'USERNAME': username, 'PASSWORD': authDetails.getPassword(), @@ -623,8 +588,7 @@ class CognitoUser { username = challengeParameters['USER_ID_FOR_SRP']; serverBValue = BigInt.parse(challengeParameters['SRP_B'], radix: 16); - saltString = - authenticationHelper.toUnsignedHex(challengeParameters['SALT']); + saltString = authenticationHelper.toUnsignedHex(challengeParameters['SALT']); salt = BigInt.parse(saltString, radix: 16); var hkdf = authenticationHelper.getPasswordAuthenticationKey( @@ -664,11 +628,9 @@ class CognitoUser { Future respondToAuthChallenge(challenge) async { var dataChallenge; try { - dataChallenge = - await client!.request('RespondToAuthChallenge', challenge); + dataChallenge = await client!.request('RespondToAuthChallenge', challenge); } on CognitoClientException catch (e) { - if (e.code == 'ResourceNotFoundException' && - e.message!.toLowerCase().contains('device')) { + if (e.code == 'ResourceNotFoundException' && e.message!.toLowerCase().contains('device')) { challengeResponses['DEVICE_KEY'] = null; _deviceKey = null; _randomPassword = null; @@ -702,26 +664,21 @@ class CognitoUser { var userAttributes; var rawRequiredAttributes; final requiredAttributes = []; - final userAttributesPrefix = authenticationHelper - .getNewPasswordRequiredChallengeUserAttributePrefix(); + final userAttributesPrefix = authenticationHelper.getNewPasswordRequiredChallengeUserAttributePrefix(); if (dataAuthenticate['ChallengeParameters'] != null) { - userAttributes = json - .decode(dataAuthenticate['ChallengeParameters']['userAttributes']); - rawRequiredAttributes = json.decode( - dataAuthenticate['ChallengeParameters']['requiredAttributes']); + userAttributes = json.decode(dataAuthenticate['ChallengeParameters']['userAttributes']); + rawRequiredAttributes = json.decode(dataAuthenticate['ChallengeParameters']['requiredAttributes']); } if (rawRequiredAttributes != null) { rawRequiredAttributes.forEach((attribute) { - requiredAttributes - .add(attribute.substring(userAttributesPrefix.length)); + requiredAttributes.add(attribute.substring(userAttributesPrefix.length)); }); } throw CognitoUserNewPasswordRequiredException( - userAttributes: userAttributes, - requiredAttributes: requiredAttributes); + userAttributes: userAttributes, requiredAttributes: requiredAttributes); } return _authenticateUserInternal(dataAuthenticate, authenticationHelper); } @@ -729,8 +686,7 @@ class CognitoUser { /// /// Translated from library `aws-android-sdk-cognitoprovider@2.6.30` file `CognitoSecretHash.java::getSecretHash()` /// - static String calculateClientSecretHash( - String userName, String clientId, String clientSecret) { + static String calculateClientSecretHash(String userName, String clientId, String clientSecret) { final hmac = Hmac(sha256, utf8.encode(clientSecret)); final digest = hmac.convert(utf8.encode(userName + clientId)); hmac.convert(digest.bytes); @@ -738,8 +694,7 @@ class CognitoUser { } /// This is used for a certain user to confirm the registration by using a confirmation code - Future confirmRegistration(String confirmationCode, - [bool forceAliasCreation = false]) async { + Future confirmRegistration(String confirmationCode, [bool forceAliasCreation = false]) async { final params = { 'ClientId': pool.getClientId(), 'ConfirmationCode': confirmationCode, @@ -767,15 +722,13 @@ class CognitoUser { } /// This is used by the user once he has the responses to a custom challenge - Future sendCustomChallengeAnswer( - String answerChallenge) async { + Future sendCustomChallengeAnswer(String answerChallenge) async { final challengeResponses = { 'USERNAME': username, 'ANSWER': answerChallenge, }; - final authenticationHelper = - AuthenticationHelper(pool.getUserPoolId()!.split('_')[1]); + final authenticationHelper = AuthenticationHelper(pool.getUserPoolId()!.split('_')[1]); await getCachedUserSession(); if (_deviceKey != null) { @@ -820,8 +773,7 @@ class CognitoUser { }); } - final authenticationHelper = - AuthenticationHelper(pool.getUserPoolId()!.split('_')[1]); + final authenticationHelper = AuthenticationHelper(pool.getUserPoolId()!.split('_')[1]); getCachedDeviceKeyAndPassword(); if (_deviceKey != null) { @@ -845,8 +797,7 @@ class CognitoUser { } /// This is used by the user once he has an MFA code - Future sendMFACode(String confirmationCode, - [String mfaType = 'SMS_MFA']) async { + Future sendMFACode(String confirmationCode, [String mfaType = 'SMS_MFA']) async { final challengeResponses = { 'USERNAME': username, 'SMS_MFA_CODE': confirmationCode, @@ -870,8 +821,7 @@ class CognitoUser { paramsReq['UserContextData'] = getUserContextData(); } - final dataAuthenticate = - await client!.request('RespondToAuthChallenge', paramsReq); + final dataAuthenticate = await client!.request('RespondToAuthChallenge', paramsReq); final String? challengeName = dataAuthenticate['ChallengeName']; @@ -879,56 +829,45 @@ class CognitoUser { return getDeviceResponse(); } - _signInUserSession = - getCognitoUserSession(dataAuthenticate['AuthenticationResult']); + _signInUserSession = getCognitoUserSession(dataAuthenticate['AuthenticationResult']); await cacheTokens(); if (dataAuthenticate['AuthenticationResult']['NewDeviceMetadata'] == null) { return _signInUserSession; } - final authenticationHelper = - AuthenticationHelper(pool.getUserPoolId()!.split('_')[1]); + final authenticationHelper = AuthenticationHelper(pool.getUserPoolId()!.split('_')[1]); authenticationHelper.generateHashDevice( - dataAuthenticate['AuthenticationResult']['NewDeviceMetadata'] - ['DeviceGroupKey'], - dataAuthenticate['AuthenticationResult']['NewDeviceMetadata'] - ['DeviceKey']); + dataAuthenticate['AuthenticationResult']['NewDeviceMetadata']['DeviceGroupKey'], + dataAuthenticate['AuthenticationResult']['NewDeviceMetadata']['DeviceKey']); final deviceSecretVerifierConfig = { 'Salt': base64.encode(hex.decode(authenticationHelper.getSaltDevices()!)), - 'PasswordVerifier': - base64.encode(hex.decode(authenticationHelper.getVerifierDevices()!)), + 'PasswordVerifier': base64.encode(hex.decode(authenticationHelper.getVerifierDevices()!)), }; verifierDevices = deviceSecretVerifierConfig['PasswordVerifier']; - _deviceGroupKey = dataAuthenticate['AuthenticationResult'] - ['NewDeviceMetadata']['DeviceGroupKey']; + _deviceGroupKey = dataAuthenticate['AuthenticationResult']['NewDeviceMetadata']['DeviceGroupKey']; _randomPassword = authenticationHelper.getRandomPassword(); final confirmDeviceParamsReq = { - 'DeviceKey': dataAuthenticate['AuthenticationResult']['NewDeviceMetadata'] - ['DeviceKey'], + 'DeviceKey': dataAuthenticate['AuthenticationResult']['NewDeviceMetadata']['DeviceKey'], 'AccessToken': _signInUserSession!.getAccessToken().getJwtToken(), 'DeviceSecretVerifierConfig': deviceSecretVerifierConfig, 'DeviceName': deviceName, }; - final dataConfirm = - await client!.request('ConfirmDevice', confirmDeviceParamsReq); - _deviceKey = dataAuthenticate['AuthenticationResult']['NewDeviceMetadata'] - ['DeviceKey']; + final dataConfirm = await client!.request('ConfirmDevice', confirmDeviceParamsReq); + _deviceKey = dataAuthenticate['AuthenticationResult']['NewDeviceMetadata']['DeviceKey']; await cacheDeviceKeyAndPassword(); if (dataConfirm['UserConfirmationNecessary'] == true) { - throw CognitoUserConfirmationNecessaryException( - signInUserSession: _signInUserSession); + throw CognitoUserConfirmationNecessaryException(signInUserSession: _signInUserSession); } return _signInUserSession; } /// This is used by an authenticated user to change the current password - Future changePassword( - String oldUserPassword, String newUserPassword) async { + Future changePassword(String oldUserPassword, String newUserPassword) async { if (!(_signInUserSession != null && _signInUserSession!.isValid())) { throw Exception('User is not authenticated'); } @@ -1002,8 +941,7 @@ class CognitoUser { } /// This is used to confirm a new password using a confirmation code - Future confirmPassword( - String confirmationCode, String newPassword) async { + Future confirmPassword(String confirmationCode, String newPassword) async { final paramsReq = { 'ClientId': pool.getClientId(), 'Username': username, @@ -1031,12 +969,9 @@ class CognitoUser { final lastUserKey = '$keyPrefix.LastAuthUser'; await Future.wait([ - storage!.setItem( - idTokenKey, _signInUserSession!.getIdToken().getJwtToken()), - storage!.setItem( - accessTokenKey, _signInUserSession!.getAccessToken().getJwtToken()), - storage!.setItem( - refreshTokenKey, _signInUserSession!.getRefreshToken()!.getToken()), + storage!.setItem(idTokenKey, _signInUserSession!.getIdToken().getJwtToken()), + storage!.setItem(accessTokenKey, _signInUserSession!.getAccessToken().getJwtToken()), + storage!.setItem(refreshTokenKey, _signInUserSession!.getRefreshToken()!.getToken()), storage!.setItem(clockDriftKey, '${_signInUserSession!.getClockDrift()}'), storage!.setItem(lastUserKey, username), ]); @@ -1060,8 +995,7 @@ class CognitoUser { /// This is used to cache the device key and device group and device password Future cacheDeviceKeyAndPassword() async { - final keyPrefix = - 'CognitoIdentityServiceProvider.${pool.getClientId()}.$username'; + final keyPrefix = 'CognitoIdentityServiceProvider.${pool.getClientId()}.$username'; final deviceKeyKey = '$keyPrefix.deviceKey'; final randomPasswordKey = '$keyPrefix.randomPasswordKey'; final deviceGroupKeyKey = '$keyPrefix.deviceGroupKey'; @@ -1075,8 +1009,7 @@ class CognitoUser { /// This is used to clear the device key info from local storage Future clearCachedDeviceKeyAndPassword() async { - final keyPrefix = - 'CognitoIdentityServiceProvider.${pool.getClientId()}.$username'; + final keyPrefix = 'CognitoIdentityServiceProvider.${pool.getClientId()}.$username'; final deviceKeyKey = '$keyPrefix.deviceKey'; final randomPasswordKey = '$keyPrefix.randomPasswordKey'; final deviceGroupKeyKey = '$keyPrefix.deviceGroupKey'; @@ -1105,8 +1038,7 @@ class CognitoUser { final attributeList = []; userData['UserAttributes'].forEach((attr) { - attributeList - .add(CognitoUserAttribute(name: attr['Name'], value: attr['Value'])); + attributeList.add(CognitoUserAttribute(name: attr['Name'], value: attr['Value'])); }); return attributeList; } diff --git a/lib/src/cognito_user_pool.dart b/lib/src/cognito_user_pool.dart index d2cac41..03471af 100644 --- a/lib/src/cognito_user_pool.dart +++ b/lib/src/cognito_user_pool.dart @@ -11,8 +11,7 @@ class CognitoUserPoolData { String? userSub; CognitoUserPoolData(this.user, {this.userConfirmed, this.userSub}); - factory CognitoUserPoolData.fromData( - CognitoUser user, Map parsedJson) { + factory CognitoUserPoolData.fromData(CognitoUser user, Map parsedJson) { return CognitoUserPoolData( user, userConfirmed: parsedJson['UserConfirmed'] ?? false, @@ -56,8 +55,7 @@ class CognitoUserPool { client = customClient; } - storage = - storage ?? (CognitoStorageHelper(CognitoMemoryStorage())).getStorage(); + storage = storage ?? (CognitoStorageHelper(CognitoMemoryStorage())).getStorage(); } String? getUserPoolId() { @@ -73,15 +71,11 @@ class CognitoUserPool { } Future getCurrentUser() async { - final lastUserKey = - 'CognitoIdentityServiceProvider.$_clientId.LastAuthUser'; + final lastUserKey = 'CognitoIdentityServiceProvider.$_clientId.LastAuthUser'; final lastAuthUser = await storage!.getItem(lastUserKey); if (lastAuthUser != null) { - return CognitoUser(lastAuthUser, this, - storage: storage, - clientSecret: _clientSecret, - deviceName: _userAgent); + return CognitoUser(lastAuthUser, this, storage: storage, clientSecret: _clientSecret, deviceName: _userAgent); } return null; @@ -91,6 +85,7 @@ class CognitoUserPool { /// This would be generated only when developer has included the JS used for collecting the /// data on their client. Please refer to documentation to know more about using AdvancedSecurity /// features + // ignore: todo /// TODO: not supported at the moment String? getUserContextData(String? username) { return null; @@ -98,7 +93,7 @@ class CognitoUserPool { /// Registers the user in the specified user pool and creates a /// user name, password, and user attributes. - Future signUp( + Future signUp( String username, String password, { List? userAttributes, @@ -113,8 +108,7 @@ class CognitoUserPool { }; if (_clientSecret != null) { - params['SecretHash'] = CognitoUser.calculateClientSecretHash( - username, _clientId!, _clientSecret!); + params['SecretHash'] = CognitoUser.calculateClientSecretHash(username, _clientId!, _clientSecret!); } final data = await client!.request('SignUp', params); @@ -122,10 +116,7 @@ class CognitoUserPool { return null; } return CognitoUserPoolData.fromData( - CognitoUser(username, this, - storage: storage, - clientSecret: _clientSecret, - deviceName: _userAgent), + CognitoUser(username, this, storage: storage, clientSecret: _clientSecret, deviceName: _userAgent), data, ); }