platform/lib/src/strategy.dart

14 lines
489 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.
2016-05-09 20:47:28 +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);
}