2.1.5
This commit is contained in:
parent
53b249da8b
commit
ccbd040741
3 changed files with 10 additions and 5 deletions
|
@ -1,3 +1,6 @@
|
|||
# 2.1.5
|
||||
* Modify `_apply` to honor an existing `User` over `Future<User>`.
|
||||
|
||||
# 2.1.4
|
||||
* Deprecate `decodeJwt`, in favor of asynchronous injections.
|
||||
|
||||
|
|
|
@ -138,10 +138,12 @@ class AngelAuth<User> {
|
|||
|
||||
void _apply(
|
||||
RequestContext req, ResponseContext res, AuthToken token, User user) {
|
||||
if (!req.container.has<User>() && !req.container.has<Future<User>>()) {
|
||||
req.container
|
||||
..registerSingleton<AuthToken>(token)
|
||||
..registerSingleton<User>(user);
|
||||
if (!req.container.has<User>()) {
|
||||
req.container.registerSingleton<User>(user);
|
||||
}
|
||||
|
||||
if (!req.container.has<AuthToken>()) {
|
||||
req.container.registerSingleton<AuthToken>(token);
|
||||
}
|
||||
|
||||
if (allowCookie == true) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: angel_auth
|
||||
description: A complete authentication plugin for Angel. Includes support for stateless JWT tokens, Basic Auth, and more.
|
||||
version: 2.1.4
|
||||
version: 2.1.5
|
||||
author: Tobe O <thosakwe@gmail.com>
|
||||
homepage: https://github.com/angel-dart/angel_auth
|
||||
environment:
|
||||
|
|
Loading…
Reference in a new issue