getResourceOwner method
Must return a ResourceOwner for a username
.
This method must return an instance of ResourceOwner if one exists for username
. Otherwise, it must return null.
Every property declared by ResourceOwner must be non-null in the return value.
server
is the AuthServer invoking this method.
Implementation
@override
Future<T?> getResourceOwner(AuthServer server, String username) {
final query = Query<T>(context)
..where((o) => o.username).equalTo(username)
..returningProperties(
(t) => [t.id, t.hashedPassword, t.salt, t.username],
);
return query.fetchOne();
}