diff --git a/packages/auth/.gitignore b/packages/auth/.gitignore index 356abd9d..24d68312 100644 --- a/packages/auth/.gitignore +++ b/packages/auth/.gitignore @@ -1,15 +1,32 @@ -# Created by .ignore support plugin (hsz.mobi) +# See https://www.dartlang.org/tools/private-files.html + +# Files and directories created by pub +.dart_tool +.packages +.pub/ +build/ + +# If you're building an application, you may want to check-in your pubspec.lock +pubspec.lock + +# Directory created by dartdoc +# If you don't generate documentation locally you can remove this line. +doc/api/ + ### Dart template # See https://www.dartlang.org/tools/private-files.html # Files and directories created by pub -.buildlog -.packages + +# SDK 1.20 and later (no longer creates packages directories) + +# Older SDK versions +# (Include if the minimum SDK version specified in pubsepc.yaml is earlier than 1.20) .project -.pub/ -build/ +.buildlog **/packages/ + # Files created by dart2js # (Most Dart developers will use pub build to compile Dart, use/modify these # rules if you intend to use dart2js directly @@ -22,36 +39,17 @@ build/ *.info.json # Directory created by dartdoc -doc/api/ # Don't commit pubspec lock file # (Library packages only! Remove pattern if developing an application package) -pubspec.lock ### JetBrains template # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 # User-specific stuff: -.idea/workspace.xml -.idea/tasks.xml -.idea/dictionaries -.idea/vcs.xml -.idea/jsLibraryMappings.xml -# Sensitive or high-churn files: -.idea/dataSources.ids -.idea/dataSources.xml -.idea/dataSources.local.xml -.idea/sqlDataSources.xml -.idea/dynamic.xml -.idea/uiDesigner.xml - -# Gradle: -.idea/gradle.xml -.idea/libraries - -# Mongo Explorer plugin: -.idea/mongoSettings.xml +## VsCode +.vscode/ ## File-based project format: *.iws @@ -59,9 +57,8 @@ pubspec.lock ## Plugin-specific files: # IntelliJ +.idea/ /out/ - -# mpeltonen/sbt-idea plugin .idea_modules/ # JIRA plugin @@ -72,5 +69,3 @@ com_crashlytics_export_strings.xml crashlytics.properties crashlytics-build.properties fabric.properties - -.dart_tool \ No newline at end of file diff --git a/packages/auth/AUTHORS.md b/packages/auth/AUTHORS.md index 2a973de6..ac95ab58 100644 --- a/packages/auth/AUTHORS.md +++ b/packages/auth/AUTHORS.md @@ -1,2 +1,12 @@ -Tobe O -Thomas Hii \ No newline at end of file +Primary Authors +=============== + +* __[Thomas Hii](dukefirehawk.apps@gmail.com)__ + + Thomas is the current maintainer of the code base. He has refactored and migrated the + code base to support NNBD. + +* __[Tobe O](thosakwe@gmail.com)__ + + Tobe has written much of the original code prior to NNBD migration. He has moved on and + is no longer involved with the project. diff --git a/packages/auth/LICENSE b/packages/auth/LICENSE index eb4ce33e..b593ac86 100644 --- a/packages/auth/LICENSE +++ b/packages/auth/LICENSE @@ -1,6 +1,6 @@ -The MIT License (MIT) +MIT License -Copyright (c) 2016 angel-dart +Copyright (c) 2021 dukefirehawk.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/packages/auth/README.md b/packages/auth/README.md index 4df0edd0..761c5404 100644 --- a/packages/auth/README.md +++ b/packages/auth/README.md @@ -1,7 +1,8 @@ -# angel_auth +# angel3_auth +[![version](https://img.shields.io/badge/pub-v2.12.4-brightgreen)](https://pub.dartlang.org/packages/angel3_auth) +[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety) -[![Pub](https://img.shields.io/pub/v/angel_auth.svg)](https://pub.dartlang.org/packages/angel_auth) -[![build status](https://travis-ci.org/angel-dart/auth.svg?branch=master)](https://travis-ci.org/angel-dart/auth) +[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/auth/LICENSE) A complete authentication plugin for Angel. Inspired by Passport. @@ -76,7 +77,7 @@ configureServer(Angel app) async { ``` This renders a simple HTML page that fires the user's JWT as a `token` event in `window.opener`. -`angel_client` [exposes this as a Stream](https://github.com/angel-dart/client#authentication): +`angel_client` [exposes this as a Stream](https://github.com/dukefirehawk/angel/tree/angel3/packages/client#authentication): ```dart app.authenticateViaPopup('/auth/google').listen((jwt) { diff --git a/packages/auth/example/example.dart b/packages/auth/example/example.dart index 87894ddb..89b8466e 100644 --- a/packages/auth/example/example.dart +++ b/packages/auth/example/example.dart @@ -1,7 +1,7 @@ import 'dart:async'; -import 'package:angel_auth/angel_auth.dart'; -import 'package:angel_framework/angel_framework.dart'; -import 'package:angel_framework/http.dart'; +import 'package:angel3_auth/angel3_auth.dart'; +import 'package:angel3_framework/angel3_framework.dart'; +import 'package:angel3_framework/http.dart'; void main() async { var app = Angel(); diff --git a/packages/auth/lib/angel_auth.dart b/packages/auth/lib/angel3_auth.dart similarity index 92% rename from packages/auth/lib/angel_auth.dart rename to packages/auth/lib/angel3_auth.dart index f6476797..95d4fc9a 100644 --- a/packages/auth/lib/angel_auth.dart +++ b/packages/auth/lib/angel3_auth.dart @@ -1,4 +1,4 @@ -library angel_auth; +library angel3_auth; export 'src/middleware/require_auth.dart'; export 'src/strategies/strategies.dart'; diff --git a/packages/auth/lib/auth_token.dart b/packages/auth/lib/auth_token.dart index ff19d35e..b1db07a0 100644 --- a/packages/auth/lib/auth_token.dart +++ b/packages/auth/lib/auth_token.dart @@ -1,4 +1,4 @@ /// Stand-alone JWT library. -library angel_auth.auth_token; +library angel3_auth.auth_token; export 'src/auth_token.dart'; diff --git a/packages/auth/lib/src/auth_token.dart b/packages/auth/lib/src/auth_token.dart index 9da2e7d7..3dddfac9 100644 --- a/packages/auth/lib/src/auth_token.dart +++ b/packages/auth/lib/src/auth_token.dart @@ -1,5 +1,5 @@ import 'dart:collection'; -import 'package:angel_framework/angel_framework.dart'; +import 'package:angel3_framework/angel3_framework.dart'; import 'dart:convert'; import 'package:crypto/crypto.dart'; diff --git a/packages/auth/lib/src/middleware/require_auth.dart b/packages/auth/lib/src/middleware/require_auth.dart index 35bfa998..0c19c3fe 100644 --- a/packages/auth/lib/src/middleware/require_auth.dart +++ b/packages/auth/lib/src/middleware/require_auth.dart @@ -1,5 +1,5 @@ import 'dart:async'; -import 'package:angel_framework/angel_framework.dart'; +import 'package:angel3_framework/angel3_framework.dart'; /// Forces Basic authentication over the requested resource, with the given [realm] name, if no JWT is present. /// diff --git a/packages/auth/lib/src/options.dart b/packages/auth/lib/src/options.dart index 1e177f47..526aa1e2 100644 --- a/packages/auth/lib/src/options.dart +++ b/packages/auth/lib/src/options.dart @@ -1,6 +1,6 @@ import 'dart:async'; -import 'package:angel_framework/angel_framework.dart'; +import 'package:angel3_framework/angel3_framework.dart'; import 'auth_token.dart'; typedef AngelAuthCallback = FutureOr Function( diff --git a/packages/auth/lib/src/plugin.dart b/packages/auth/lib/src/plugin.dart index 0c39e944..5103b300 100644 --- a/packages/auth/lib/src/plugin.dart +++ b/packages/auth/lib/src/plugin.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'dart:io'; import 'dart:math'; -import 'package:angel_framework/angel_framework.dart'; +import 'package:angel3_framework/angel3_framework.dart'; import 'package:crypto/crypto.dart'; import 'auth_token.dart'; import 'options.dart'; diff --git a/packages/auth/lib/src/popup_page.dart b/packages/auth/lib/src/popup_page.dart index 3ff336d4..cb6b3007 100644 --- a/packages/auth/lib/src/popup_page.dart +++ b/packages/auth/lib/src/popup_page.dart @@ -1,5 +1,5 @@ import 'dart:convert'; -import 'package:angel_framework/angel_framework.dart'; +import 'package:angel3_framework/angel3_framework.dart'; import 'package:http_parser/http_parser.dart'; import 'options.dart'; diff --git a/packages/auth/lib/src/strategies/local.dart b/packages/auth/lib/src/strategies/local.dart index 4c0873d0..99cbf7da 100644 --- a/packages/auth/lib/src/strategies/local.dart +++ b/packages/auth/lib/src/strategies/local.dart @@ -1,6 +1,6 @@ import 'dart:async'; import 'dart:convert'; -import 'package:angel_framework/angel_framework.dart'; +import 'package:angel3_framework/angel3_framework.dart'; import '../options.dart'; import '../strategy.dart'; diff --git a/packages/auth/lib/src/strategy.dart b/packages/auth/lib/src/strategy.dart index a7ec4c70..d8fe6411 100644 --- a/packages/auth/lib/src/strategy.dart +++ b/packages/auth/lib/src/strategy.dart @@ -1,5 +1,5 @@ import 'dart:async'; -import 'package:angel_framework/angel_framework.dart'; +import 'package:angel3_framework/angel3_framework.dart'; import 'options.dart'; /// A function that handles login and signup for an Angel application. diff --git a/packages/auth/pubspec.yaml b/packages/auth/pubspec.yaml index e79c3e6b..5d9a5560 100644 --- a/packages/auth/pubspec.yaml +++ b/packages/auth/pubspec.yaml @@ -1,17 +1,12 @@ -name: angel_auth +name: angel3_auth description: A complete authentication plugin for Angel. Includes support for stateless JWT tokens, Basic Auth, and more. version: 4.0.0 -homepage: https://github.com/dukefirehawk/angel +homepage: https://github.com/dukefirehawk/angel/tree/angel3/packages/auth publish_to: none environment: sdk: '>=2.12.0 <3.0.0' dependencies: - angel_framework: -# path: ../framework - git: - url: https://github.com/dukefirehawk/angel.git - ref: sdk-2.12.x_nnbd - path: packages/framework + angel3_framework: ^4.0.0 charcode: ^1.2.0 collection: ^1.15.0 crypto: ^3.0.0 @@ -23,8 +18,4 @@ dev_dependencies: io: ^1.0.0 logging: ^1.0.0 pedantic: ^1.11.0 - test: ^1.17.3 - -#dependency_overrides: -# angel_container: -# path: ../container/angel_container \ No newline at end of file + test: ^1.17.4 diff --git a/packages/auth/test/auth_token_test.dart b/packages/auth/test/auth_token_test.dart index c677016e..1171cac5 100644 --- a/packages/auth/test/auth_token_test.dart +++ b/packages/auth/test/auth_token_test.dart @@ -1,4 +1,4 @@ -import 'package:angel_auth/src/auth_token.dart'; +import 'package:angel3_auth/src/auth_token.dart'; import 'package:crypto/crypto.dart'; import 'package:test/test.dart'; diff --git a/packages/auth/test/callback_test.dart b/packages/auth/test/callback_test.dart index 1f1043da..4c0de241 100644 --- a/packages/auth/test/callback_test.dart +++ b/packages/auth/test/callback_test.dart @@ -1,7 +1,7 @@ import 'dart:io'; -import 'package:angel_auth/angel_auth.dart'; -import 'package:angel_framework/angel_framework.dart'; -import 'package:angel_framework/http.dart'; +import 'package:angel3_auth/angel3_auth.dart'; +import 'package:angel3_framework/angel3_framework.dart'; +import 'package:angel3_framework/http.dart'; import 'dart:convert'; import 'package:collection/collection.dart' show IterableExtension; import 'package:http/http.dart' as http; diff --git a/packages/auth/test/config_test.dart b/packages/auth/test/config_test.dart index 14bab026..cc13d30f 100644 --- a/packages/auth/test/config_test.dart +++ b/packages/auth/test/config_test.dart @@ -1,4 +1,4 @@ -import 'package:angel_auth/angel_auth.dart'; +import 'package:angel3_auth/angel3_auth.dart'; import 'package:test/test.dart'; void main() { diff --git a/packages/auth/test/local_test.dart b/packages/auth/test/local_test.dart index 74d6a002..ca73f1c0 100644 --- a/packages/auth/test/local_test.dart +++ b/packages/auth/test/local_test.dart @@ -1,7 +1,7 @@ import 'dart:async'; -import 'package:angel_auth/angel_auth.dart'; -import 'package:angel_framework/angel_framework.dart'; -import 'package:angel_framework/http.dart'; +import 'package:angel3_auth/angel3_auth.dart'; +import 'package:angel3_framework/angel3_framework.dart'; +import 'package:angel3_framework/http.dart'; import 'dart:convert'; import 'package:http/http.dart' as http; import 'package:logging/logging.dart'; diff --git a/packages/auth/test/protect_cookie_test.dart b/packages/auth/test/protect_cookie_test.dart index df42aff1..367fbf2e 100644 --- a/packages/auth/test/protect_cookie_test.dart +++ b/packages/auth/test/protect_cookie_test.dart @@ -1,6 +1,6 @@ import 'dart:io'; -import 'package:angel_auth/angel_auth.dart'; +import 'package:angel3_auth/angel3_auth.dart'; import 'package:test/test.dart'; const Duration threeDays = Duration(days: 3);