From 33dd5190296b1d0639b746b2fe05b317e64d2ef7 Mon Sep 17 00:00:00 2001 From: flashwave Date: Tue, 3 Sep 2024 16:14:03 +0000 Subject: [PATCH] Fixes + make scope field optional. --- oatmeal.php | 9 +++------ src/AuthzCodeRoutes.php | 9 ++++----- src/ClientCredsRoutes.php | 2 +- src/DeviceCodeRoutes.php | 9 ++++++--- src/OatmealContext.php | 2 +- src/RefreshTokenRoutes.php | 12 +++++++++++- 6 files changed, 26 insertions(+), 17 deletions(-) diff --git a/oatmeal.php b/oatmeal.php index 6713a12..dfdd093 100644 --- a/oatmeal.php +++ b/oatmeal.php @@ -1,9 +1,6 @@
@@ -146,9 +144,10 @@ HTML; $query = [ 'response_type' => 'code', 'client_id' => $clientId, - 'scope' => $scope, ]; + if($scope !== '') + $query['scope'] = $scope; if($redirectUri !== '') $query['redirect_uri'] = $redirectUri; if($state !== '') diff --git a/src/ClientCredsRoutes.php b/src/ClientCredsRoutes.php index aa8ffc8..33322be 100644 --- a/src/ClientCredsRoutes.php +++ b/src/ClientCredsRoutes.php @@ -1,8 +1,8 @@
@@ -93,7 +93,10 @@ HTML; $scope = (string)$content->getParam('scope'); $headers = []; - $body = ['scope' => $scope]; + $body = []; + + if($scope !== '') + $body['scope'] = $scope; if($clientSecret === '') $body['client_id'] = $clientId; diff --git a/src/OatmealContext.php b/src/OatmealContext.php index 8a6dc60..bcf03cf 100644 --- a/src/OatmealContext.php +++ b/src/OatmealContext.php @@ -1,8 +1,8 @@
+
+ +
Authentication: