Publish angel3_auth
This commit is contained in:
parent
f0077caaa5
commit
36874a97ec
20 changed files with 69 additions and 72 deletions
55
packages/auth/.gitignore
vendored
55
packages/auth/.gitignore
vendored
|
@ -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
|
### Dart template
|
||||||
# See https://www.dartlang.org/tools/private-files.html
|
# See https://www.dartlang.org/tools/private-files.html
|
||||||
|
|
||||||
# Files and directories created by pub
|
# 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
|
.project
|
||||||
.pub/
|
.buildlog
|
||||||
build/
|
|
||||||
**/packages/
|
**/packages/
|
||||||
|
|
||||||
|
|
||||||
# Files created by dart2js
|
# Files created by dart2js
|
||||||
# (Most Dart developers will use pub build to compile Dart, use/modify these
|
# (Most Dart developers will use pub build to compile Dart, use/modify these
|
||||||
# rules if you intend to use dart2js directly
|
# rules if you intend to use dart2js directly
|
||||||
|
@ -22,36 +39,17 @@ build/
|
||||||
*.info.json
|
*.info.json
|
||||||
|
|
||||||
# Directory created by dartdoc
|
# Directory created by dartdoc
|
||||||
doc/api/
|
|
||||||
|
|
||||||
# Don't commit pubspec lock file
|
# Don't commit pubspec lock file
|
||||||
# (Library packages only! Remove pattern if developing an application package)
|
# (Library packages only! Remove pattern if developing an application package)
|
||||||
pubspec.lock
|
|
||||||
### JetBrains template
|
### JetBrains template
|
||||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
||||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||||
|
|
||||||
# User-specific stuff:
|
# User-specific stuff:
|
||||||
.idea/workspace.xml
|
|
||||||
.idea/tasks.xml
|
|
||||||
.idea/dictionaries
|
|
||||||
.idea/vcs.xml
|
|
||||||
.idea/jsLibraryMappings.xml
|
|
||||||
|
|
||||||
# Sensitive or high-churn files:
|
## VsCode
|
||||||
.idea/dataSources.ids
|
.vscode/
|
||||||
.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
|
|
||||||
|
|
||||||
## File-based project format:
|
## File-based project format:
|
||||||
*.iws
|
*.iws
|
||||||
|
@ -59,9 +57,8 @@ pubspec.lock
|
||||||
## Plugin-specific files:
|
## Plugin-specific files:
|
||||||
|
|
||||||
# IntelliJ
|
# IntelliJ
|
||||||
|
.idea/
|
||||||
/out/
|
/out/
|
||||||
|
|
||||||
# mpeltonen/sbt-idea plugin
|
|
||||||
.idea_modules/
|
.idea_modules/
|
||||||
|
|
||||||
# JIRA plugin
|
# JIRA plugin
|
||||||
|
@ -72,5 +69,3 @@ com_crashlytics_export_strings.xml
|
||||||
crashlytics.properties
|
crashlytics.properties
|
||||||
crashlytics-build.properties
|
crashlytics-build.properties
|
||||||
fabric.properties
|
fabric.properties
|
||||||
|
|
||||||
.dart_tool
|
|
|
@ -1,2 +1,12 @@
|
||||||
Tobe O <thosakwe@gmail.com>
|
Primary Authors
|
||||||
Thomas Hii <thomashii@dukefirehawk.com>
|
===============
|
||||||
|
|
||||||
|
* __[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.
|
||||||
|
|
|
@ -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
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
|
@ -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)
|
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/auth/LICENSE)
|
||||||
[![build status](https://travis-ci.org/angel-dart/auth.svg?branch=master)](https://travis-ci.org/angel-dart/auth)
|
|
||||||
|
|
||||||
A complete authentication plugin for Angel. Inspired by Passport.
|
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`.
|
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
|
```dart
|
||||||
app.authenticateViaPopup('/auth/google').listen((jwt) {
|
app.authenticateViaPopup('/auth/google').listen((jwt) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:angel_auth/angel_auth.dart';
|
import 'package:angel3_auth/angel3_auth.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
var app = Angel();
|
var app = Angel();
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
library angel_auth;
|
library angel3_auth;
|
||||||
|
|
||||||
export 'src/middleware/require_auth.dart';
|
export 'src/middleware/require_auth.dart';
|
||||||
export 'src/strategies/strategies.dart';
|
export 'src/strategies/strategies.dart';
|
|
@ -1,4 +1,4 @@
|
||||||
/// Stand-alone JWT library.
|
/// Stand-alone JWT library.
|
||||||
library angel_auth.auth_token;
|
library angel3_auth.auth_token;
|
||||||
|
|
||||||
export 'src/auth_token.dart';
|
export 'src/auth_token.dart';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import 'dart:collection';
|
import 'dart:collection';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'package:crypto/crypto.dart';
|
import 'package:crypto/crypto.dart';
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import 'dart:async';
|
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.
|
/// Forces Basic authentication over the requested resource, with the given [realm] name, if no JWT is present.
|
||||||
///
|
///
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'auth_token.dart';
|
import 'auth_token.dart';
|
||||||
|
|
||||||
typedef AngelAuthCallback = FutureOr Function(
|
typedef AngelAuthCallback = FutureOr Function(
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:crypto/crypto.dart';
|
import 'package:crypto/crypto.dart';
|
||||||
import 'auth_token.dart';
|
import 'auth_token.dart';
|
||||||
import 'options.dart';
|
import 'options.dart';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import 'dart:convert';
|
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 'package:http_parser/http_parser.dart';
|
||||||
import 'options.dart';
|
import 'options.dart';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import '../options.dart';
|
import '../options.dart';
|
||||||
import '../strategy.dart';
|
import '../strategy.dart';
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'options.dart';
|
import 'options.dart';
|
||||||
|
|
||||||
/// A function that handles login and signup for an Angel application.
|
/// A function that handles login and signup for an Angel application.
|
||||||
|
|
|
@ -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.
|
description: A complete authentication plugin for Angel. Includes support for stateless JWT tokens, Basic Auth, and more.
|
||||||
version: 4.0.0
|
version: 4.0.0
|
||||||
homepage: https://github.com/dukefirehawk/angel
|
homepage: https://github.com/dukefirehawk/angel/tree/angel3/packages/auth
|
||||||
publish_to: none
|
publish_to: none
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.12.0 <3.0.0'
|
sdk: '>=2.12.0 <3.0.0'
|
||||||
dependencies:
|
dependencies:
|
||||||
angel_framework:
|
angel3_framework: ^4.0.0
|
||||||
# path: ../framework
|
|
||||||
git:
|
|
||||||
url: https://github.com/dukefirehawk/angel.git
|
|
||||||
ref: sdk-2.12.x_nnbd
|
|
||||||
path: packages/framework
|
|
||||||
charcode: ^1.2.0
|
charcode: ^1.2.0
|
||||||
collection: ^1.15.0
|
collection: ^1.15.0
|
||||||
crypto: ^3.0.0
|
crypto: ^3.0.0
|
||||||
|
@ -23,8 +18,4 @@ dev_dependencies:
|
||||||
io: ^1.0.0
|
io: ^1.0.0
|
||||||
logging: ^1.0.0
|
logging: ^1.0.0
|
||||||
pedantic: ^1.11.0
|
pedantic: ^1.11.0
|
||||||
test: ^1.17.3
|
test: ^1.17.4
|
||||||
|
|
||||||
#dependency_overrides:
|
|
||||||
# angel_container:
|
|
||||||
# path: ../container/angel_container
|
|
||||||
|
|
|
@ -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:crypto/crypto.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:angel_auth/angel_auth.dart';
|
import 'package:angel3_auth/angel3_auth.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'package:collection/collection.dart' show IterableExtension;
|
import 'package:collection/collection.dart' show IterableExtension;
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import 'package:angel_auth/angel_auth.dart';
|
import 'package:angel3_auth/angel3_auth.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:angel_auth/angel_auth.dart';
|
import 'package:angel3_auth/angel3_auth.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel3_framework/angel3_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel3_framework/http.dart';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:angel_auth/angel_auth.dart';
|
import 'package:angel3_auth/angel3_auth.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
const Duration threeDays = Duration(days: 3);
|
const Duration threeDays = Duration(days: 3);
|
||||||
|
|
Loading…
Reference in a new issue