Skip to content

Commit d026fdc

Browse files
garg-muditroot
andauthored
Version 8.8.1-v2.1-26.1.00.00 release (#255)
Co-authored-by: root <root@devcenteradmin.docusigntest.com>
1 parent 1936a03 commit d026fdc

6 files changed

Lines changed: 53 additions & 29 deletions

File tree

.swagger-codegen-ignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,5 @@ autoload.php
3939
phpunit.xml.dist
4040
docs/
4141
test/
42-
src/ApiClient.php
4342
src/ApiException.php
44-
src/Client/
43+
src/Client/Auth/**

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.
33

44
See [DocuSign Support Center](https://support.docusign.com/en/releasenotes/) for Product Release Notes.
55

6+
## [v8.8.1] - eSignature API v2.1-26.1.00.00 - 2026-05-05
7+
### Changed
8+
- Replaced JWT dependency: Switched from firebase/php-jwt (^6.0) to adhocore/jwt (^1.1) in composer.json template.
9+
- Updated JWT import namespace: Changed use Firebase\JWT\JWT to use Ahc\Jwt\JWT in ApiClient.
10+
611
## [v8.8.0] - eSignature API v2.1-26.1.00.00 - 2026-03-05
712
### Changed
813
- Added support for version v2.1-26.1.00.00 of the DocuSign ESignature API.

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ This client SDK is provided as open source, which enables you to customize its f
3030
<a id="versionInformation"></a>
3131
### Version Information
3232
- **API version**: v2.1
33-
- **Latest SDK version**: 8.8.0
33+
- **Latest SDK version**: 8.8.1
3434

3535
<a id="requirements"></a>
3636
### Requirements
@@ -70,7 +70,9 @@ This client has the following external dependencies:
7070
* [PHP cURL extension](https://www.php.net/manual/en/intro.curl.php)
7171
* [PHP JSON extension](https://php.net/manual/en/book.json.php)
7272
* [PHP MBString extension](https://www.php.net/manual/en/intro.mbstring.php)
73-
* firebase/php-jwt v6.0
73+
* adhocore/jwt v1.1+
74+
75+
> **⚠ Deprecation Notice:** Support for PHP versions below 8.0 will be phased out in the coming months. A new SDK compatible with PHP 8.1 will be released, which replaces adhocore/jwt with firebase/php-jwt v7. We strongly recommend upgrading to PHP 8.1 or later to maintain compatibility with upcoming SDK releases.
7476
7577
<a id="apiReference"></a>
7678
## API Reference

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"ext-curl": "*",
2323
"ext-json": "*",
2424
"ext-mbstring": "*",
25-
"firebase/php-jwt": "^6.0"
25+
"adhocore/jwt": "^1.1"
2626
},
2727
"require-dev": {
2828
"phpunit/phpunit": "~4.8",

src/Client/ApiClient.php

Lines changed: 40 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?php
2+
23
/**
34
* ApiClient
45
*
5-
* PHP version 5
6+
* PHP version 7.4
67
*
78
* @category Class
89
* @package DocuSign\eSign
@@ -11,13 +12,14 @@
1112
*/
1213

1314
/**
14-
* DocuSign REST API
15+
* Docusign eSignature REST API
1516
*
16-
* The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign.
17+
* The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign.
1718
*
18-
* OpenAPI spec version: v2
19+
* OpenAPI spec version: v2.1
1920
* Contact: devcenter@docusign.com
2021
* Generated by: https://github.com/swagger-api/swagger-codegen.git
22+
* Swagger Codegen version: 2.4.21
2123
*/
2224

2325
/**
@@ -32,15 +34,15 @@
3234
use \DocuSign\eSign\Configuration;
3335
use \DocuSign\eSign\ObjectSerializer;
3436
use SebastianBergmann\RecursionContext\InvalidArgumentException;
35-
use Firebase\JWT\JWT;
36-
37+
use Ahc\Jwt\JWT;
3738

3839
/**
3940
* ApiClient Class Doc Comment
4041
*
4142
* @category Class
4243
* @package DocuSign\eSign
43-
* @author Swagger Codegen team
44+
* @author Swagger Codegen team <apihelp@docusign.com>
45+
* @license The Docusign PHP Client SDK is licensed under the MIT License.
4446
* @link https://github.com/swagger-api/swagger-codegen
4547
*/
4648
class ApiClient
@@ -53,8 +55,6 @@ class ApiClient
5355
public static $PUT = "PUT";
5456
public static $DELETE = "DELETE";
5557

56-
57-
5858
public static $SCOPE_SIGNATURE = "signature";
5959
public static $SCOPE_EXTENDED = "extended";
6060
public static $SCOPE_IMPERSONATION = "impersonation";
@@ -170,14 +170,14 @@ public function getApiKeyWithPrefix($apiKeyIdentifier)
170170
* @param string $endpointPath path to method endpoint before expanding parameters
171171
* @param bool $oAuth pass true in case of oAuth requests
172172
*
173-
* @throws ApiException on a non 2xx response
173+
* @throws DocuSign\eSign\Client\ApiException on a non 2xx response
174174
* @return mixed
175175
*/
176176
public function callApi($resourcePath, $method, $queryParams, $postData, $headerParams, $responseType = null, $endpointPath = null, $oAuth = false)
177177
{
178178
$headers = [];
179179

180-
// DocuSign: Add DocuSign tracking headers
180+
// Docusign: Add Docusign tracking headers
181181
$this->config->addDefaultHeader("X-DocuSign-SDK", "PHP");
182182

183183
$url = $this->config->getHost() . $resourcePath;
@@ -220,11 +220,12 @@ public function callApi($resourcePath, $method, $queryParams, $postData, $header
220220
if ($this->config->getCurlTimeout() !== 0) {
221221
curl_setopt($curl, CURLOPT_TIMEOUT, $this->config->getCurlTimeout());
222222
}
223+
223224
// set connect timeout, if needed
224225
if ($this->config->getCurlConnectTimeout() != 0) {
225226
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, $this->config->getCurlConnectTimeout());
226227
}
227-
228+
228229
// return the result on success, rather than just true
229230
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
230231

@@ -337,6 +338,7 @@ public function callApi($resourcePath, $method, $queryParams, $postData, $header
337338
if (json_last_error() > 0) { // if response is a string
338339
$data = $http_body;
339340
}
341+
340342
if(is_object($serializedData)){
341343
$serializedData = serialize($serializedData);
342344
}
@@ -429,7 +431,7 @@ protected function httpParseHeaders($raw_headers)
429431
/**
430432
* Helper method to configure the OAuth accessCode/implicit flow parameters
431433
*
432-
* @param string $client_id DocuSign OAuth Client Id(AKA Integrator Key)
434+
* @param string $client_id Docusign OAuth Client Id(AKA Integrator Key)
433435
* @param string|array $scopes the list of requested scopes. Client applications may be scoped to a limited set of system access.
434436
* @param string $redirect_uri This determines where to deliver the response containing the authorization code
435437
* @param string $response_type Determines the response type of the authorization request, NOTE: these response types are
@@ -465,8 +467,8 @@ public function getAuthorizationURI($client_id, $scopes, $redirect_uri, $respons
465467
/**
466468
* GenerateAccessToken will exchange the authorization code for an access token and refresh tokens.
467469
*
468-
* @param string $client_id DocuSign OAuth Client Id(AKA Integrator Key)
469-
* @param string $client_secret The secret key you generated when you set up the integration in DocuSign Admin console.
470+
* @param string $client_id Docusign OAuth Client Id(AKA Integrator Key)
471+
* @param string $client_secret The secret key you generated when you set up the integration in Docusign Admin console.
470472
* @param string $code The authorization code
471473
*
472474
* @return array
@@ -505,8 +507,8 @@ public function generateAccessToken($client_id = null, $client_secret = null, $c
505507
/**
506508
* Refresh Access Token
507509
*
508-
* @param string $client_id DocuSign OAuth Client Id(AKA Integrator Key)
509-
* @param string $client_secret The secret key you generated when you set up the integration in DocuSign Admin console.
510+
* @param string $client_id Docusign OAuth Client Id(AKA Integrator Key)
511+
* @param string $client_secret The secret key you generated when you set up the integration in Docusign Admin console.
510512
* @param string $code The authorization code
511513
*
512514
* @return array
@@ -544,7 +546,7 @@ public function refreshAccessToken($client_id = null, $client_secret = null, $re
544546
/**
545547
* Request JWT User Token
546548
*
547-
* @param string $client_id DocuSign OAuth Client Id(AKA Integrator Key)
549+
* @param string $client_id Docusign OAuth Client Id(AKA Integrator Key)
548550
* @param string $rsa_private_key the RSA private key
549551
* @param string|string[] $scopes array optional The list of requested scopes may include (but not limited to) You can also pass any advanced scope.
550552
* @param string $user_id
@@ -583,7 +585,15 @@ public function requestJWTUserToken($client_id, $user_id, $rsa_private_key, $sco
583585
"scope" => is_array($scopes)?implode(" ", $scopes): $scopes
584586
];
585587

586-
$jwt = JWT::encode($claim, $rsa_private_key, 'RS256');
588+
$private_key = openssl_pkey_get_private($rsa_private_key);
589+
if ($private_key === false && is_file($rsa_private_key)) {
590+
$private_key = openssl_pkey_get_private('file://' . $rsa_private_key);
591+
}
592+
if ($private_key === false) {
593+
throw new \InvalidArgumentException('Invalid RSA private key provided when calling requestJWTUserToken');
594+
}
595+
596+
$jwt = (new JWT($private_key, 'RS256'))->encode($claim);
587597

588598
$resourcePath = "/oauth/token";
589599
$queryParams = [];
@@ -605,7 +615,7 @@ public function requestJWTUserToken($client_id, $user_id, $rsa_private_key, $sco
605615
/**
606616
* Request JWT Application Token
607617
*
608-
* @param string $client_id DocuSign OAuth Client Id(AKA Integrator Key)
618+
* @param string $client_id Docusign OAuth Client Id(AKA Integrator Key)
609619
* @param string $rsa_private_key the RSA private key
610620
* @param string|string[] $scopes array optional The list of requested scopes may include (but not limited to) You can also pass any advanced scope.
611621
* @param int $expires_in int Number of minutes token will be valid
@@ -639,7 +649,15 @@ public function requestJWTApplicationToken($client_id, $rsa_private_key, $scopes
639649
"scope" => is_array($scopes)?implode(" ", $scopes):$scopes
640650
];
641651

642-
$jwt = JWT::encode($claim, $rsa_private_key, 'RS256');
652+
$private_key = openssl_pkey_get_private($rsa_private_key);
653+
if ($private_key === false && is_file($rsa_private_key)) {
654+
$private_key = openssl_pkey_get_private('file://' . $rsa_private_key);
655+
}
656+
if ($private_key === false) {
657+
throw new \InvalidArgumentException('Invalid RSA private key provided when calling requestJWTApplicationToken');
658+
}
659+
660+
$jwt = (new JWT($private_key, 'RS256'))->encode($claim);
643661

644662
$resourcePath = "/oauth/token";
645663
$queryParams = [];
@@ -694,4 +712,4 @@ public function getUserInfo($access_token)
694712
$httpHeader
695713
];
696714
}
697-
}
715+
}

src/Configuration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class Configuration
111111
*
112112
* @var string
113113
*/
114-
protected $userAgent = 'Swagger-Codegen/v2.1/8.8.0/php/' . PHP_VERSION;
114+
protected $userAgent = 'Swagger-Codegen/v2.1/8.8.1/php/' . PHP_VERSION;
115115

116116
/**
117117
* Debug switch (default set to false)
@@ -774,7 +774,7 @@ public static function toDebugReport()
774774
$report .= ' OS: ' . php_uname() . PHP_EOL;
775775
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
776776
$report .= ' OpenAPI Spec Version: v2.1' . PHP_EOL;
777-
$report .= ' SDK Package Version: 8.8.0' . PHP_EOL;
777+
$report .= ' SDK Package Version: 8.8.1' . PHP_EOL;
778778
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;
779779

780780
return $report;

0 commit comments

Comments
 (0)