34 | * Note: This might be replaced by utility method from commons-lang or guava someday 35 | * if one of those libraries is added as dependency. 36 | *
37 | * 38 | * @param array The array of strings 39 | * @param separator The separator 40 | * @return the resulting string 41 | */ 42 | public static String join(String[] array, String separator) { 43 | int len = array.length; 44 | if (len == 0) { 45 | return ""; 46 | } 47 | 48 | StringBuilder out = new StringBuilder(); 49 | out.append(array[0]); 50 | for (int i = 1; i < len; i++) { 51 | out.append(separator).append(array[i]); 52 | } 53 | return out.toString(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # DocuSign Click Java Client Changelog 2 | See [DocuSign Support Center](https://support.docusign.com/en/releasenotes/) for Product Release Notes. 3 | 4 | ## [v1.5.0] - Click API v1-22.4.02.00 - 2023-06-12 5 | ### Changed 6 | - Added support for version v1-22.4.02.00 of the DocuSign Click API. 7 | - Updated the SDK release version. 8 | 9 | ## [v1.4.0] - Click API v1-22.4.01.00 - 2023-05-09 10 | ### Changed 11 | - Added support for version v1-22.4.01.00 of the DocuSign Click API. 12 | - Added support for Jakarta library integration 13 | - Updated the SDK release version. 14 | 15 | ## [v1.3.0] - Click API v1-22.4.01.00 - 2023-02-13 16 | ### Changed 17 | - Added support for version v1-22.4.01.00 of the DocuSign Click API. 18 | - Updated the SDK release version. 19 | 20 | ## [v1.2.2] - Click API v1-22.3.01.00 - 2022-10-28 21 | ### Changed 22 | - Added support for version v1-22.3.01.00 of the DocuSign Click API. 23 | - Updated the SDK release version. 24 | 25 | ## [1.1.0] - Click API v1-21.4.01 - 2021-12-08 26 | ### Changed 27 | - Added support for version v1-21.4.01 of the DocuSign Click API. 28 | - Updated the SDK release version. 29 | 30 | 31 | ## [1.1.0-RC1] - Click API v1-21.4.00 - 2021-11-22 32 | ### Changed 33 | - Added support for version v1-21.4.00 of the DocuSign Click API. 34 | - Updated the SDK release version. 35 | 36 | 37 | ## [v1.0.0] - DocuSign Click API v1-20.4.02 - 2021-02-11 38 | ### Changed 39 | - Added support for version v1-20.4.02 of the DocuSign Click API. 40 | - Updated the SDK release version. 41 | 42 | ## [v1.0.0-BETA] - DocuSign Click API v1.0.0 - 2020-12-28 43 | ### Changed 44 | - First Beta version of DocuSign Click API. 45 | -------------------------------------------------------------------------------- /src/main/java/com/docusign/click/client/auth/HttpBasicAuth.java: -------------------------------------------------------------------------------- 1 | 2 | 3 | package com.docusign.click.client.auth; 4 | 5 | import com.docusign.click.client.Pair; 6 | 7 | import java.util.Base64; 8 | import java.nio.charset.StandardCharsets; 9 | 10 | import java.util.Map; 11 | import java.util.List; 12 | 13 | 14 | 15 | 16 | /** 17 | * HttpBasicAuth class. 18 | * 19 | */ 20 | public class HttpBasicAuth implements Authentication { 21 | private String username; 22 | private String password; 23 | 24 | /** 25 | * getUsername method. 26 | * 27 | * @return String 28 | */ 29 | public String getUsername() { 30 | return username; 31 | } 32 | 33 | /** 34 | * setUsername method. 35 | * 36 | * @param username Sets username 37 | */ 38 | public void setUsername(String username) { 39 | this.username = username; 40 | } 41 | 42 | /** 43 | * getPassword method. 44 | * 45 | * @return String 46 | */ 47 | public String getPassword() { 48 | return password; 49 | } 50 | 51 | /** 52 | * setPassword method. 53 | * 54 | * @param password Sets password 55 | */ 56 | public void setPassword(String password) { 57 | this.password = password; 58 | } 59 | 60 | /** 61 | * applyToParams method. 62 | * 63 | * @param queryParams The query params 64 | * @param headerParams The header params 65 | */ 66 | @Override 67 | public void applyToParams(List
38 | * Note: If you make changes to the object mapper, remember to set it back via
39 | * setObjectMapper in order to trigger HTTP client rebuilding.
40 | *