Skip to content

Commit 745ad9c

Browse files
authored
Merge pull request #82 from docusign/DCM-2570
Fixed issue #81
2 parents 21a0ff7 + 880a3bc commit 745ad9c

File tree

3 files changed

+361
-138
lines changed

3 files changed

+361
-138
lines changed

CHANGELOG.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
# Change Log
2-
All notable changes to this project will be documented in this file.
3-
1+
# DocuSign Java Client Changelog
42
See [DocuSign Support Center](https://support.docusign.com/en/releasenotes/) for Product Release Notes.
53

6-
## [Unreleased]
7-
### Changed
8-
- Updated the package with the latest API monthly release.
9-
4+
## [v2.6.2] - eSignature API v18.1.02 - 7/3/2018
5+
### Fixed
6+
* Fixed a problem that could cause the getUserInfo method to generate an exception when returning information about a user who was part of an organization. The method now returns same set of organization data as the [oauth/userinfo](https://developers.docusign.com/esign-rest-api/guides/authentication/user-info-endpoints) API endpoint method.
107

118
## [2.6.1] - 2018-06-06
129
### Security

src/main/java/com/docusign/esign/client/ApiClient.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ public class ApiClient {
7676

7777
public ApiClient() {
7878
mapper = new ObjectMapper();
79+
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
7980
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
8081
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
8182
mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
@@ -514,6 +515,7 @@ public OAuth.OAuthToken generateAccessToken(String clientId, String clientSecret
514515
respBody);
515516
}
516517
ObjectMapper mapper = new ObjectMapper();
518+
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
517519
OAuth.OAuthToken oAuthToken = mapper.readValue(response.getEntityInputStream(), OAuth.OAuthToken.class);
518520
return oAuthToken;
519521
} catch (JsonParseException e) {
@@ -550,6 +552,7 @@ public OAuth.UserInfo getUserInfo(String accessToken) throws IllegalArgumentExce
550552
respBody);
551553
}
552554
ObjectMapper mapper = new ObjectMapper();
555+
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
553556
OAuth.UserInfo userInfo = mapper.readValue(response.getEntityInputStream(), OAuth.UserInfo.class);
554557

555558
// TODO "auto-assign base uri of the default account" is coming in next versions
@@ -562,7 +565,7 @@ public OAuth.UserInfo getUserInfo(String accessToken) throws IllegalArgumentExce
562565
}*/
563566
return userInfo;
564567
} catch (Exception e) {
565-
throw new ApiException("Error while fecthing user info: " + e.getMessage());
568+
throw new ApiException("Error while fetching user info: " + e.getMessage());
566569
}
567570
}
568571

@@ -623,6 +626,7 @@ public void configureJWTAuthorizationFlow(String publicKeyFilename, String priva
623626
.post(ClientResponse.class, form);
624627

625628
ObjectMapper mapper = new ObjectMapper();
629+
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
626630
JsonNode responseJson = mapper.readValue(response.getEntityInputStream(), JsonNode.class);
627631
if (!responseJson.has("access_token") || !responseJson.has("expires_in")) {
628632
throw new ApiException("Error while requesting an access token: " + responseJson);

0 commit comments

Comments
 (0)