Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
## [v2.0.0-RC1] - WebForms API v1.1.0-1.0.4 - 2024-09-24
### Changed
- Added support for version v1.1.0-1.0.4 of the DocuSign WebForms API.
- Updated the SDK release version.
- Model classes are now serializable.
- Resolved an issue where setting a default SSL socket for the entire JVM caused unintended side effects.
- Fixed a memory leak related to the class loader.
- Addressed dependency vulnerabilities in the following libraries:
- bcprov-jdk18on updated to version 1.78.1
- com.fasterxml.jackson.core updated to version 2.17.1
- org.json updated to version 20240303
- jersey updated to version 3.1.6
- Modified the default basePath to DEMO_REST_BASEPATH.

### Breaking changes
- Deprecation of OLTU library: The OLTU library for handling OAuth is no longer used.
### Other Changes
- Upgradation of OWASP for vulnerability check of dependencies.

## Important Action Required
- User needs to update the base URL in your codebase (if passing to SDK explicitly) and remove the /v1.1 component at the end of the URL for the SDK to work properly with this release.

## [v1.0.0] - WebForms API v1.1.0-1.0.2 - 2024-02-14
## Version 1.0.0 (Initial Release)
- Introducing the SDK based on the OpenAPI specification of DocuSign WebForms APIs.
Expand Down
139 changes: 90 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,78 +1,119 @@
# The Official DocuSign WebForms Java Client SDK
# The Official Docusign WebForms Java Client SDK

[![Build status][travis-image]][travis-url]
[![Maven Central status][maven-image]][maven-url]

The Docusign SDK makes integrating Docusign into your apps and websites a seamless experience.

## Table of Contents
- [Introduction](#introduction)
- [Installation](#installation)
* [Version Information](#versionInformation)
* [Requirements](#requirements)
* [Compatibility](#compatibility)
* [Maven](#maven)
- [Dependencies](#dependencies)
- [API Reference](#apiReference)
- [Code Examples](#codeExamples)
- [OAuth Implementations](#oauthImplementations)
- [Changelog](#changeLog)
- [Support](#support)
- [License](#license)
- [Additional Resources](#additionalResources)

<a id="introduction"></a>
## Introduction
Leverage the power of Web Forms in your agreement processes. Enjoy greater flexibility to manage forms using your own code including the creation and management of form instances with prefilled data. This API works with Docusign JS to enable the embedding of a web form instance in your web application.

<a id="installation"></a>
## Installation
This client SDK is provided as open source, which enables you to customize its functionality to suit your particular use case. To do so, download or clone the repository. If the SDK’s given functionality meets your integration needs, or if you’re working through our [code examples](https://developers.docusign.com/docs/web-forms-api/how-to/) from the [Docusign Developer Center](https://developers.docusign.com/), you merely need to install it by following the instructions below.

<a id="versionInformation"></a>
### Version Information
- **API version**: 1.1.0
- **Latest SDK version (Including prerelease)**:

<a id="requirements"></a>
## Requirements
* Java 1.9+
* Free [developer account](https://go.docusign.com/sandbox/productshot/?elqCampaignId=16531)
* Free [developer account](https://go.docusign.com/o/sandbox/?postActivateUrl=https://developers.docusign.com/)

<a id="compatibility"></a>
## Compatibility
* Java 1.9+
## Note

This open-source SDK is provided for cases where you would like to make additional changes that the SDK does not
provide out-of-the-box. If you simply want to use the SDK with any of the examples shown in the [Developer Center ](https://developers.docusign.com/docs/webforms-api), follow the installation instructions below.

## Installation

Note: DocuSign uses **Eclipse** with **Maven** for testing purposes.

<a id="maven"></a>
**Note:** Docusign uses Eclipse with Maven for testing purposes.
### Maven:
1. In Eclipse, create a new project by selecting **File** -> **New** -> **Project**.
2. In the **New Project Wizard** , expand **Maven** , then select **Maven Project.**
1. In Eclipse, create a new project by selecting **File > New > Project**.
2. In the New Project Wizard, expand **Maven,** then select **Maven Project.**
3. Leave **Create a simple project** unchecked.
4. Select **Next** , then provide a unique **Group** and **Artifact Id**.
5. In the directory where you've saved your project, open the _pom.xml_ file.
6. In the _pom.xml_ file, locate the **dependencies** node.
7. Add:

```
<dependency>
<groupId>com.docusign</groupId>
<artifactId>docusign-admin-java</artifactId>
<version>1.1.0</version>
</dependency>
```

8. If your project is still open, restart **Eclipse**.

## Dependencies
4. Select **Next,** then provide a unique **groupId** and **artifactId.**
5. In the directory where you've saved your project, open the pom.xml file.
6. In the pom.xml file, locate the `dependencies` node.
7. Add:
```
<dependency>
<groupId>com.docusign</groupId>
<artifactId>docusign-webforms-java</artifactId>
<version>2.0.0-RC1</version>
</dependency>
```
8. If your project is still open, restart Eclipse.

<a id="dependencies"></a>
## SDK Dependencies
This client has the following external dependencies:
* io.swagger:swagger-annotations:jar:1.5.17
* org.glassfish.jersey.core:jersey-client:jar:2.29.1
* org.glassfish.jersey.media:jersey-media-multipart:jar:2.29.1
* org.glassfish.jersey.media:jersey-media-json-jackson:2.29.1
* com.fasterxml.jackson.core:jackson-core:jar:2.12.1
* com.fasterxml.jackson.core:jackson-annotations:jar:2.12.1
* com.fasterxml.jackson.core:jackson-databind:2.12.1
- com.brsanthu:migbase64:2.2
* junit:junit:jar:4.13.1
* com.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.2
* io.swagger.core.v3:swagger-annotations:2.2.8
* org.glassfish.jersey.core:jersey-client:3.1.6
* org.glassfish.jersey.media:jersey-media-multipart:3.1.6
* org.glassfish.jersey.media:jersey-media-json-jackson:3.1.6
* org.glassfish.jersey.inject:jersey-hk2:3.1.6
* com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-base:2.14.2
* com.auth0:java-jwt:3.4.1
* org.bouncycastle:bcprov-jdk15on:1.60
* org.bouncycastle:bcprov-jdk18on:1.78.1
* com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.14.2
* com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.14.2
* com.brsanthu:migbase64:2.2
* com.fasterxml.jackson.core:jackson-core:2.17.1
* org.json:json:20240303


<a id="apiReference"></a>
## API Reference
You can refer to the API reference [here](https://developers.docusign.com/docs/web-forms-api/reference/).

<a id="codeExamples"></a>
## Code examples
You can find on our GitHub a self-executing package of code examples for the WebForms Java SDK, called a [Launcher](https://github.com/docusign/code-examples-java/blob/master/README.md), that demonstrates common use cases. You can also download a version preconfigured for your DocuSign developer account from [Quickstart](https://developers.docusign.com/docs/webforms-rest-api/quickstart/). These examples can use either the [Authorization Code Grant](https://developers.docusign.com/webforms-rest-api/guides/authentication/oauth2-code-grant) or [JSON Web Token (JWT)](https://developers.docusign.com/webforms-rest-api/guides/authentication/oauth2-jsonwebtoken) authentication workflows.
Explore our GitHub repository for the [Launcher](https://github.com/docusign/code-examples-java/), a self-executing package housing code examples for the WebForms Java SDK. This package showcases several common use cases and their respective source files. Additionally, you can download a version preconfigured for your Docusign developer account from [Quickstart](https://developers.docusign.com/docs/esign-rest-api/quickstart/). These examples support both the [Authorization Code Grant](https://developers.docusign.com/platform/auth/authcode/) and [JSON Web Token (JWT)](https://developers.docusign.com/platform/auth/jwt/) authentication workflows.

<a id="oauthImplementations"></a>
## OAuth implementations
For details regarding which type of OAuth grant will work best for your DocuSign integration, see [Choose OAuth Type](https://developers.docusign.com/platform/auth/choose/) in the [DocuSign Developer Center](https://developers.docusign.com/).
For details regarding which type of OAuth grant will work best for your Docusign integration, see [Choose OAuth Type](https://developers.docusign.com/platform/auth/choose/) in the [Docusign Developer Center](https://developers.docusign.com/).

For security purposes, Docusign recommends using the [Authorization Code Grant](https://developers.docusign.com/platform/auth/authcode/) flow.

For security purposes, DocuSign recommends using the [Authorization Code Grant](https://developers.docusign.com/webforms-rest-api/guides/authentication/oauth2-code-grant) flow.
<a id="changeLog"></a>
## Changelog
You can refer to the complete changelog [here](https://github.com/docusign/docusign-webforms-java-client/blob/master/CHANGELOG.md).

<a id="support"></a>
## Support
Log issues against this client through GitHub. We also have an [active developer community on Stack Overflow](https://stackoverflow.com/questions/tagged/docusignapi).
Log issues against this client SDK through GitHub. You can also reach out to us through [Docusign Community](https://community.docusign.com/developer-59) and [Stack Overflow](https://stackoverflow.com/questions/tagged/docusignapi).

<a id="license"></a>
## License
The DocuSign WebForms Java Client SDK is licensed under the [MIT License](https://github.com/docusign/docusign-java-client/blob/master/LICENSE).
The Docusign WebForms Java Client SDK is licensed under the [MIT License](https://github.com/docusign/docusign-webforms-java-client/blob/master/LICENSE).

<a id="additionalResources"></a>
### Additional resources
* [DocuSign Developer Center](https://developers.docusign.com/)
* [DocuSign API on Twitter](https://twitter.com/docusignapi)
* [DocuSign For Developers on LinkedIn](https://www.linkedin.com/showcase/docusign-for-developers/)
* [DocuSign For Developers on YouTube](https://www.youtube.com/channel/UCJSJ2kMs_qeQotmw4-lX2NQ)
* [Docusign Developer Center](https://developers.docusign.com/)
* [Docusign API on Twitter](https://twitter.com/docusignapi)
* [Docusign For Developers on LinkedIn](https://www.linkedin.com/showcase/docusign-for-developers/)
* [Docusign For Developers on YouTube](https://www.youtube.com/channel/UCJSJ2kMs_qeQotmw4-lX2NQ)

[travis-image]: https://api.travis-ci.com/docusign/docusign-webforms-java-client.svg?branch=master
[travis-url]: https://app.travis-ci.com/github/docusign/docusign-webforms-java-client
[maven-image]: https://img.shields.io/maven-central/v/com.docusign/docusign-webforms-java.svg?style=flat
[maven-image]: https://img.shields.io/maven-central/v/com.docusign/.svg?style=flat
[maven-url]: https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.docusign%22
47 changes: 36 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<artifactId>docusign-webforms-java</artifactId>
<packaging>jar</packaging>
<name>docusign-webforms-java</name>
<version>1.0.0</version>
<version>2.0.0-RC1</version>
<url>https://developers.docusign.com</url>
<description>The DocuSign NuGet package makes integrating DocuSign into your apps and websites a super fast and painless process. The library is open sourced on GitHub, look for the docusign-webforms-csharp-client repository.</description>
<description>The Docusign NuGet package makes integrating Docusign into your apps and websites a super fast and painless process. The library is open sourced on GitHub, look for the docusign-webforms-csharp-client repository.</description>

<prerequisites>
<maven>2.2.0</maven>
Expand Down Expand Up @@ -227,6 +227,21 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>10.0.2</version>
<configuration>
<failBuildOnCVSS>8</failBuildOnCVSS>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
Expand Down Expand Up @@ -341,11 +356,6 @@
<artifactId>jackson-jakarta-rs-base</artifactId>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>org.apache.oltu.oauth2</groupId>
<artifactId>org.apache.oltu.oauth2.client</artifactId>
<version>${oltu-version}</version>
</dependency>
<!-- JWT signing and verifying -->
<dependency>
<groupId>com.auth0</groupId>
Expand All @@ -354,8 +364,8 @@
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.69</version>
<artifactId>bcprov-jdk18on</artifactId>
<version>1.78.1</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
Expand Down Expand Up @@ -391,13 +401,28 @@
<artifactId>migbase64</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.10.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.17.1</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20240303</version>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<swagger-core-version>2.2.8</swagger-core-version>
<jersey-version>3.0.9</jersey-version>
<jersey-version>3.1.6</jersey-version>
<jackson-version>2.14.2</jackson-version>
<junit-version>4.13.1</junit-version>
<oltu-version>1.0.2</oltu-version>
</properties>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ public ApiResponse<WebFormInstance > createInstanceWithHttpInfo(String accountId
}

// create path and map variables
String localVarPath = "/accounts/{account_id}/forms/{form_id}/instances"
.replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "form_id" + "\\}", apiClient.escapeString(formId.toString()));
String localVarPath = "/v1.1/accounts/{accountId}/forms/{formId}/instances"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "formId" + "\\}", apiClient.escapeString(formId.toString()));

// query params
java.util.List<Pair> localVarQueryParams = new java.util.ArrayList<Pair>();
Expand Down Expand Up @@ -171,10 +171,10 @@ public ApiResponse<WebFormInstance > getInstanceWithHttpInfo(String accountId, S
}

// create path and map variables
String localVarPath = "/accounts/{account_id}/forms/{form_id}/instances/{instance_id}"
.replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "form_id" + "\\}", apiClient.escapeString(formId.toString()))
.replaceAll("\\{" + "instance_id" + "\\}", apiClient.escapeString(instanceId.toString()));
String localVarPath = "/v1.1/accounts/{accountId}/forms/{formId}/instances/{instanceId}"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "formId" + "\\}", apiClient.escapeString(formId.toString()))
.replaceAll("\\{" + "instanceId" + "\\}", apiClient.escapeString(instanceId.toString()));

// query params
java.util.List<Pair> localVarQueryParams = new java.util.ArrayList<Pair>();
Expand Down Expand Up @@ -281,9 +281,9 @@ public ApiResponse<WebFormInstanceList > listInstancesWithHttpInfo(String accoun
}

// create path and map variables
String localVarPath = "/accounts/{account_id}/forms/{form_id}/instances"
.replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "form_id" + "\\}", apiClient.escapeString(formId.toString()));
String localVarPath = "/v1.1/accounts/{accountId}/forms/{formId}/instances"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "formId" + "\\}", apiClient.escapeString(formId.toString()));

// query params
java.util.List<Pair> localVarQueryParams = new java.util.ArrayList<Pair>();
Expand Down Expand Up @@ -358,10 +358,10 @@ public ApiResponse<WebFormInstance > refreshTokenWithHttpInfo(String accountId,
}

// create path and map variables
String localVarPath = "/accounts/{account_id}/forms/{form_id}/instances/{instance_id}/refresh"
.replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "form_id" + "\\}", apiClient.escapeString(formId.toString()))
.replaceAll("\\{" + "instance_id" + "\\}", apiClient.escapeString(instanceId.toString()));
String localVarPath = "/v1.1/accounts/{accountId}/forms/{formId}/instances/{instanceId}/refresh"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "formId" + "\\}", apiClient.escapeString(formId.toString()))
.replaceAll("\\{" + "instanceId" + "\\}", apiClient.escapeString(instanceId.toString()));

// query params
java.util.List<Pair> localVarQueryParams = new java.util.ArrayList<Pair>();
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/docusign/webforms/api/FormManagementApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ public ApiResponse<WebForm > getFormWithHttpInfo(String accountId, String formId
}

// create path and map variables
String localVarPath = "/accounts/{account_id}/forms/{form_id}"
.replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "form_id" + "\\}", apiClient.escapeString(formId.toString()));
String localVarPath = "/v1.1/accounts/{accountId}/forms/{formId}"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "formId" + "\\}", apiClient.escapeString(formId.toString()));

// query params
java.util.List<Pair> localVarQueryParams = new java.util.ArrayList<Pair>();
Expand Down Expand Up @@ -335,8 +335,8 @@ public ApiResponse<WebFormSummaryList > listFormsWithHttpInfo(String accountId,
}

// create path and map variables
String localVarPath = "/accounts/{account_id}/forms"
.replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString()));
String localVarPath = "/v1.1/accounts/{accountId}/forms"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()));

// query params
java.util.List<Pair> localVarQueryParams = new java.util.ArrayList<Pair>();
Expand Down
Loading