platform/lib/src/strategy.dart

16 lines
496 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.
abstract class AuthStrategy {
String name;
/// Authenticates or rejects an incoming user.
2018-07-12 17:11:54 +00:00
Future authenticate(RequestContext req, ResponseContext res,
[AngelAuthOptions options]);
2016-05-03 04:13:19 +00:00
/// Determines whether a signed-in user can log out or not.
Future<bool> canLogout(RequestContext req, ResponseContext res);
2018-07-12 17:11:54 +00:00
}