Update auth.dart
This commit is contained in:
parent
52fedf6d17
commit
9794d05264
1 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ class AuthController extends Controller {
|
|||
serializer(User user) async => user.id;
|
||||
|
||||
/// Attempt to log a user in
|
||||
verifier(UserService userService) {
|
||||
LocalAuthVerifier localVerifier(UserService userService) {
|
||||
return (String username, String password) async {
|
||||
List<User> users = await userService.index({'query':{'username': username}});
|
||||
|
||||
|
@ -30,7 +30,7 @@ class AuthController extends Controller {
|
|||
..serializer = serializer
|
||||
..deserializer = deserializer
|
||||
..strategies.add(
|
||||
new LocalAuthStrategy(verifier(app.container.make(UserService))));
|
||||
new LocalAuthStrategy(localVerifier(app.container.make(UserService))));
|
||||
|
||||
await super.call(app);
|
||||
await app.configure(auth);
|
||||
|
|
Loading…
Reference in a new issue