2016-09-21 06:19:52 +00:00
|
|
|
import 'dart:async';
|
2021-05-14 11:09:48 +00:00
|
|
|
import 'package:angel3_framework/angel3_framework.dart';
|
2016-09-21 06:19:52 +00:00
|
|
|
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.
|
2021-03-20 23:51:20 +00:00
|
|
|
FutureOr<User?> authenticate(RequestContext req, ResponseContext res,
|
2021-06-07 00:50:39 +00:00
|
|
|
[AngelAuthOptions<User>? options]);
|
2018-07-12 17:11:54 +00:00
|
|
|
}
|