This commit is contained in:
thosakwe 2017-06-03 17:41:26 -04:00
parent 71a6479b41
commit f29fcbf3c9

View file

@ -288,8 +288,10 @@ class AngelAuth<T> extends AngelPlugin {
for (int i = 0; i < names.length; i++) {
var name = names[i];
AuthStrategy strategy =
strategies.firstWhere((AuthStrategy x) => x.name == name);
AuthStrategy strategy = strategies.firstWhere(
(AuthStrategy x) => x.name == name,
orElse: () =>
throw new ArgumentError('No strategy "$name" found.'));
var result = await strategy.authenticate(req, res, options);
if (result == true)
return result;