From cd4537733eefea6f3ee3f9bc2f421d6e69f81ad4 Mon Sep 17 00:00:00 2001 From: thosakwe Date: Wed, 26 Apr 2017 09:59:27 -0400 Subject: [PATCH] 1.0.4 --- .idea/angel_auth.iml | 3 ++- README.md | 2 +- lib/src/plugin.dart | 5 +++++ pubspec.yaml | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.idea/angel_auth.iml b/.idea/angel_auth.iml index 3889dae0..085f4ea4 100644 --- a/.idea/angel_auth.iml +++ b/.idea/angel_auth.iml @@ -12,7 +12,8 @@ - + + \ No newline at end of file diff --git a/README.md b/README.md index cfd6077b..39b78d74 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # angel_auth -[![version 1.0.3](https://img.shields.io/badge/version-1.0.3-brightgreen.svg)](https://pub.dartlang.org/packages/angel_auth) +[![version 1.0.4](https://img.shields.io/badge/version-1.0.4-brightgreen.svg)](https://pub.dartlang.org/packages/angel_auth) ![build status](https://travis-ci.org/angel-dart/auth.svg?branch=master) A complete authentication plugin for Angel. Inspired by Passport. diff --git a/lib/src/plugin.dart b/lib/src/plugin.dart index 6c6bc1a4..1dfff5ee 100644 --- a/lib/src/plugin.dart +++ b/lib/src/plugin.dart @@ -161,6 +161,11 @@ class AngelAuth extends AngelPlugin { var jwt = getJwt(req); + if (jwt == null) { + var body = await req.lazyBody(); + jwt = body['token']; + } + if (debug) print('Found JWT: $jwt'); if (jwt == null) { diff --git a/pubspec.yaml b/pubspec.yaml index 15e95380..67e800e3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: angel_auth description: A complete authentication plugin for Angel. -version: 1.0.3 +version: 1.0.4 author: Tobe O homepage: https://github.com/angel-dart/angel_auth environment: