User injection
This commit is contained in:
parent
feaab715da
commit
a504ac46e6
3 changed files with 7 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
# angel_auth
|
||||
|
||||

|
||||
[](https://pub.dartlang.org/packages/angel_auth)
|
||||

|
||||
|
||||
A complete authentication plugin for Angel. Inspired by Passport.
|
||||
|
|
|
@ -118,8 +118,11 @@ class AngelAuth extends AngelPlugin {
|
|||
print('Now deserializing from this userId: ${token.userId}');
|
||||
}
|
||||
|
||||
req.inject(AuthToken, req.properties['token'] = token);
|
||||
req.properties["user"] = await deserializer(token.userId);
|
||||
final user = await deserializer(token.userId);
|
||||
|
||||
req
|
||||
..inject(AuthToken, req.properties['token'] = token)
|
||||
..inject(user.runtimeType, req.properties["user"] = user);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: angel_auth
|
||||
description: A complete authentication plugin for Angel.
|
||||
version: 1.0.0-dev+13
|
||||
version: 1.0.0-dev+14
|
||||
author: Tobe O <thosakwe@gmail.com>
|
||||
homepage: https://github.com/angel-dart/angel_auth
|
||||
dependencies:
|
||||
|
|
Loading…
Reference in a new issue