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: