1.0.5
This commit is contained in:
parent
71a6479b41
commit
f29fcbf3c9
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue