diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f28d4b2..389d72b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,8 +10,8 @@ * Upgraded: angel3_container_generator * Upgraded: angel3_mock_request * Upgraded: angel3_framework -* Upgraded: angel3_auth (todo) -* Upgraded: angel3_configuration (todo) +* Upgraded: angel3_auth +* Upgraded: angel3_configuration * Upgraded: angel3_validate (todo) ## 7.0.0 diff --git a/packages/auth/lib/src/strategies/local.dart b/packages/auth/lib/src/strategies/local.dart index d4d8b68f..a0407153 100644 --- a/packages/auth/lib/src/strategies/local.dart +++ b/packages/auth/lib/src/strategies/local.dart @@ -5,8 +5,6 @@ import 'package:angel3_framework/angel3_framework.dart'; import '../options.dart'; import '../strategy.dart'; -bool _validateString(String? str) => str != null && str.isNotEmpty; - /// Determines the validity of an incoming username and password. // typedef FutureOr LocalAuthVerifier(String? username, String? password); typedef LocalAuthVerifier = FutureOr Function( @@ -72,22 +70,7 @@ class LocalAuthStrategy extends AuthStrategy { } } - if (verificationResult == null) { - var body = await req - .parseBody() - .then((_) => req.bodyAsMap) - .catchError((_) => {}); - //if (body != null) { - if (_validateString(body[usernameField].toString()) && - _validateString(body[passwordField].toString())) { - verificationResult = await verifier( - body[usernameField].toString(), body[passwordField].toString()); - } - //} - } - - if (verificationResult == null || - (verificationResult is Map && verificationResult.isEmpty)) { + if (verificationResult is Map && verificationResult.isEmpty) { if (localOptions.failureRedirect != null && localOptions.failureRedirect!.isNotEmpty) { await res.redirect(localOptions.failureRedirect, code: 401); diff --git a/packages/auth/test/protect_cookie_test.dart b/packages/auth/test/protect_cookie_test.dart index b9a9e4aa..ddd750f1 100644 --- a/packages/auth/test/protect_cookie_test.dart +++ b/packages/auth/test/protect_cookie_test.dart @@ -11,7 +11,7 @@ void main() { secureCookies: true, cookieDomain: 'SECURE', jwtLifeSpan: threeDays.inMilliseconds, - serializer: (u) => u as String, + serializer: (u) => u, deserializer: (u) => u); setUp(() => defaultCookie = Cookie('a', 'b')); diff --git a/packages/configuration/CHANGELOG.md b/packages/configuration/CHANGELOG.md index e6dde2e1..2aaedd2c 100644 --- a/packages/configuration/CHANGELOG.md +++ b/packages/configuration/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 8.0.0 + +* Require Dart >= 3.0 + ## 7.0.0 * Require Dart >= 2.17 diff --git a/packages/configuration/pubspec.yaml b/packages/configuration/pubspec.yaml index 86ad7c71..dc81fdad 100644 --- a/packages/configuration/pubspec.yaml +++ b/packages/configuration/pubspec.yaml @@ -1,32 +1,32 @@ name: angel3_configuration -version: 7.0.0 +version: 8.0.0 description: Automatic YAML application configuration loader for Angel 3, with .env support. homepage: https://angel3-framework.web.app/ repository: https://github.com/dukefirehawk/angel/tree/master/packages/configuration environment: sdk: '>=3.0.0 <4.0.0' dependencies: - angel3_framework: ^7.0.0 - belatuk_merge_map: ^4.0.0 - dotenv: ^4.0.0 - file: ^6.1.0 + angel3_framework: ^8.0.0 + belatuk_merge_map: ^5.0.0 + dotenv: ^4.1.0 + file: ^7.0.0 yaml: ^3.1.0 dev_dependencies: io: ^1.0.0 - logging: ^1.0.1 - lints: ^2.0.0 - belatuk_pretty_logging: ^5.0.0 - test: ^1.21.0 -# dependency_overrides: -# angel3_container: -# path: ../container/angel_container -# angel3_framework: -# path: ../framework -# angel3_http_exception: -# path: ../http_exception -# angel3_model: -# path: ../model -# angel3_route: -# path: ../route -# angel3_mock_request: -# path: ../mock_request \ No newline at end of file + logging: ^1.1.0 + lints: ^2.1.0 + belatuk_pretty_logging: ^6.0.0 + test: ^1.24.0 +dependency_overrides: + angel3_container: + path: ../container/angel_container + angel3_framework: + path: ../framework + angel3_http_exception: + path: ../http_exception + angel3_model: + path: ../model + angel3_route: + path: ../route + angel3_mock_request: + path: ../mock_request \ No newline at end of file