From eb31a1a2c974ca9595f97ba18dc860a61052e3e0 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Fri, 3 May 2019 02:14:08 -0400 Subject: [PATCH] +1 --- CHANGELOG.md | 3 +++ lib/src/server.dart | 3 +-- pubspec.yaml | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 076791ef..8fd6d44f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 2.2.0+1 +* Parse+verify client for `authorization_code`. + # 2.2.0 * Pass `client` to `exchangeAuthorizationCodeForToken`. * Apply `package:pedantic`. diff --git a/lib/src/server.dart b/lib/src/server.dart index 19d805d5..457cc319 100644 --- a/lib/src/server.dart +++ b/lib/src/server.dart @@ -371,8 +371,7 @@ abstract class AuthorizationServer { var grantType = await _getParam(req, 'grant_type', state, body: true, throwIfEmpty: false); - if (grantType != 'authorization_code' && - grantType != 'urn:ietf:params:oauth:grant-type:device_code' && + if (grantType != 'urn:ietf:params:oauth:grant-type:device_code' && grantType != null) { var match = _rgxBasic.firstMatch(req.headers.value('authorization') ?? ''); diff --git a/pubspec.yaml b/pubspec.yaml index 2a09e6e3..2c33082e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: angel_oauth2 author: Tobe O description: A class containing handlers that can be used within Angel to build a spec-compliant OAuth 2.0 server. homepage: https://github.com/angel-dart/oauth2.git -version: 2.2.0 +version: 2.2.0+1 environment: sdk: ">=2.0.0-dev <3.0.0" dependencies: