This commit is contained in:
Tobe O 2018-06-27 12:42:43 -04:00
parent 21d3d1927b
commit 456f4f3d01
3 changed files with 6 additions and 4 deletions

View file

@ -1,3 +1,6 @@
# 1.1.1+1
* Update `protectCookie` to only send `maxAge` when it is not `-1`.
# 1.1.1
* Added `protectCookie`, to better protect data sent in cookies.

View file

@ -172,10 +172,9 @@ class AngelAuth<T> {
cookie.domain ??= cookieDomain;
}
cookie.maxAge ??=
_jwtLifeSpan < 0 ? -1 : _jwtLifeSpan ~/ Duration.millisecondsPerSecond;
if (_jwtLifeSpan > 0) {
cookie.maxAge ??=
_jwtLifeSpan < 0 ? -1 : _jwtLifeSpan ~/ Duration.millisecondsPerSecond;
cookie.expires ??=
new DateTime.now().add(new Duration(milliseconds: _jwtLifeSpan));
}

View file

@ -1,6 +1,6 @@
name: angel_auth
description: A complete authentication plugin for Angel.
version: 1.1.1
version: 1.1.1+1
author: Tobe O <thosakwe@gmail.com>
homepage: https://github.com/angel-dart/angel_auth
environment: