platform/packages/auth/lib/src/strategy.dart

11 lines
370 B
Dart
Raw Normal View History

2016-09-21 06:19:52 +00:00
import 'dart:async';
import 'package:angel_framework/angel_framework.dart';
import 'options.dart';
2016-05-03 04:13:19 +00:00
/// A function that handles login and signup for an Angel application.
2018-09-11 22:03:35 +00:00
abstract class AuthStrategy<User> {
2016-05-03 04:13:19 +00:00
/// Authenticates or rejects an incoming user.
2018-09-11 22:03:35 +00:00
FutureOr<User> authenticate(RequestContext req, ResponseContext res,
2018-09-12 03:16:17 +00:00
[AngelAuthOptions<User> options]);
2018-07-12 17:11:54 +00:00
}