# Java SDK

The Java SDK is split into several modules. Start with [**Java Modules**](https://docs.licensespring.com/sdks/java-sdk/java-modules) to pick the right one for your app.

For background on concurrent licensing, see [**Floating Licenses**](https://docs.licensespring.com/license-entitlements/floating-licenses).

For server-side operations like creating orders and generating license keys, see the [**Management API**](https://docs.licensespring.com/management-api/introduction).

{% hint style="danger" %}
Minimum Java version for this SDK is 8.161.
{% endhint %}

{% hint style="info" %}
If you are unsure which module to implement, see [**Java Modules**](https://docs.licensespring.com/sdks/java-sdk/java-modules).
{% endhint %}

{% hint style="info" %}
From version 2.2.0 onwards, you can find release artifacts and hosted Javadoc links on [**Javadoc & Downloads**](https://docs.licensespring.com/sdks/java-sdk/javadoc-and-downloads).
{% endhint %}

### Release Notes

### March 19th, 2026, v2.27.4

#### **License Client:**

* **Fix:** Offline license refresh file V2 signature verification (follow-up to v2.27.2)
  * The platform signs `license_signature_v2` against JSON with only `license_signature_v2` removed — `license_signature` (v1) is included in the signed data
  * The v2.27.2 fix incorrectly stripped both signature fields before verification, which still caused `"Could not verify license"` errors on refresh files
  * V2 verification now tries multiple strategies to handle both newer and older platform signing behavior
  * Affects `LicenseManager.activateFromOfflineResponse()` and `LicenseManager.updateFromOfflineResponse()`

### **March 12th, 2026, v2.27.2**&#x20;

#### **License Client:**

* **Fix:** Offline license refresh file signature verification
  * Fixed `activateFromOfflineResponse()` failing to verify `license_signature_v2` on refresh files downloaded from the platform (License → Device → "Download license refresh file")
  * Affects `LicenseManager.activateFromOfflineResponse()` and `LicenseManager.updateFromOfflineResponse()`

### March 4th, 2026, v2.27.1

#### License Client:

* **Fix:** Consumption licenses with unlimited overages (`maxOverages=0`) now correctly allow consumptions beyond `maxConsumptions`
  * Previously, after license reactivation, the SDK would throw `ConsumptionException` even when the license had unlimited overages enabled
  * The same fix applies to feature-level consumption overages

### February 10th, 2026, v2.27.0 <a href="#fqfgt" id="fqfgt"></a>

#### License Client: <a href="#ppzpd" id="ppzpd"></a>

* **New:** Added fields to LicenseData: isLicensed, isValid, isExpired, licenseActive, licenseEnabled, floatingInUseDevices, maxLicenseUsers, signature, startDate, trialDays, policyId, and others

#### Floating Client: <a href="#ipb-d" id="ipb-d"></a>

* **New:** Added support for Floating Server v2.2.0 (except license bundles)
* Updated [Floating Server V2](https://docs.licensespring.com/sdks/java-sdk/floating-server-v2) with full API reference including getLicenseUsers(), getLicenseFeatures(), offline/airgap methods, configuration endpoints, and typical integration flow

### February 3rd, 2026, v2.26.2 <a href="#tybvp" id="tybvp"></a>

#### License Client: <a href="#c3maf" id="c3maf"></a>

* Add schema v2 support for offline deactivation request (activation request already has it)

### December 9th, 2025, v2.26.1

#### License Client:

* **Fix:** Character encoding issue in offline license signature verification
  * Fixed `String.getBytes()` call in `AuthorizationService.checkSignature()` to explicitly use UTF-8 encoding
  * Previously, signature verification would fail when JVM default charset was not UTF-8 (e.g., `windows-1250`) and license contained non-ASCII characters (e.g., customer names like "József", "Pelikán")
* **New:** Added `NoDelete` variants for offline deactivation methods
  * `offlineDeactivationFileNoDelete(License license, String destination)` - generates deactivation file without clearing local license storage
  * `offlineDeactivationStreamNoDelete(License license, OutputStream outputStream)` - writes deactivation request to stream without clearing local license storage
  * Use these methods when you need to ensure the deactivation data is safely persisted before clearing the license, then call `clearLocalStorage()` manually

#### Floating Client:

* **Fix:** Connection leak in `ProxyFloatingService`
  * Fixed response body not being closed in `serverHealthy()`, `setPassword()`, `setKeys()`, and `unregisterAll()` methods
  * This was causing OkHttp warnings: "A connection was leaked. Did you forget to close a response body?"

### December 2nd, 2025, v2.26.0

#### License Client:

* Added `encryptionKey` configuration parameter to `LicenseSpringConfiguration`
  * Allows setting a custom, stable encryption key for local license file (`license.key`) encryption
  * Decouples license file encryption from authentication credentials (sharedKey/clientSecret)
  * Useful when using OAuth authentication where the clientSecret may rotate
* Added automatic migration support in `EncryptedFileLicenseRepository`
  * On load, if decryption with the primary key fails, the SDK will attempt to decrypt using fallback keys (sharedKey, clientSecret)
  * If successful, the license is automatically re-saved with the new encryption key

#### Migration Guide

{% stepper %}
{% step %}

### Configure both current secret and new encryption key

```java
LicenseSpringConfiguration config = LicenseSpringConfiguration.builder()
    .clientId("your-client-id")
    .clientSecret("current-client-secret")
    .productCode("PRODUCT")
    .encryptionKey("your-stable-encryption-key")
    .build();
```

{% endstep %}

{% step %}

### What happens on first load()

* The SDK will try to decrypt with encryptionKey (fails for existing files)
* Fall back to clientSecret (succeeds)
* Automatically re-save the license encrypted with encryptionKey
  {% endstep %}

{% step %}

### Result

Future OAuth secret rotations will not affect the license file encryption.
{% endstep %}
{% endstepper %}

***

### November 19th, 2025, v2.25.2

**All:**

* Added **floatingInUseDevices** and **floatingInUse** to **LicenseFeature** (used with floating server)

**Floating Client:**

* Changed signature verification to use decoder instead of interceptor for floating v2 api (was consuming body stream too early, causing problems with other interceptors)

**All:**

* Fix issue with encoding non-ASCII characters in Offline file

### October 27th, 2025, v2.25.0

**All:**

* Add new Hardware ID Algorithms:
  * `DEFAULT`
  * `WINDOWS_HARDWARE_FINGERPRINT_ID`
  * `WINDOWS_COMPUTER_SYSTEM_PRODUCT_ID`
  * `WINDOWS_CRYPTOGRAPHY_ID`
  * `LINUX_MACHINE_ID`
  * `CLOUD_PLATFORMS_ID`

### October 6th, 2025, v2.24.1

**All:**

* Fix Signature encoding in Offline License File V2

### September 19th, 2025, v2.24.0

**All:**

* Offline License File V2 - new JSON schema

### September 16th, 2025, v2.23.1

**All:**

* null check on License Consumptions - for licenses without negative consumptions or unlimited consumptions configured

### September 15th, 2025, v2.23.0

**All:**

* null check on License Feature Consumptions - for legacy license features without negative consumptions or unlimited consumptions configured

### August 26th, 2025, v2.22.0

* **DEPRECATION:**
  * **LicenseService**
    * **deactivateOffline(LicenseIdentity identity)**
    * **deactivateLicenseOffline(LicenseIdentity identity)**
  * **LicenseManager**
    * **offlineDeactivationFile(LicenseIdentity identity, String destination)**
    * **offlineDeactivationStream(LicenseIdentity identity, OutputStream)**
    * **deactivateLicenseOffline(LicenseIdentity identity)**
* All Deprecated methods have been replaced with equivalent method that uses **License** parameter instead of **LicenseIdentity** parameter

### July 24th, 2025, v2.21.1

**License Client:**

* added licenseData.getCompany.getId() field
* AUTO\_NODE\_LOCK max time to execute 1,5sec (removed default retry)

### July 11th, 2025, v2.21.0

**Floating Client:**

* Experimental Floating Server v2 Support
* Added methods to ProxyFloatingService to support Floating Server v2:
  * getLicenses
  * changePassword
  * borrowLicenseV2
  * registerUserToLicenseV2
  * unregisterUserFromLicenseV2
  * registerFeatureForUserV2
  * unregisterFeatureForUserV2
  * addConsumptionToLicenseV2
  * addConsumptionToFeatureV2
  * addLicenseV2
  * getLicenseById
  * removeLicenseById
  * addUser
  * removeUser
  * login

### July 7th, 2025, v2.20.5

**License Client:**

* Base64Codec.decode now trims whitespace before decoding (to resolve issues in existing CI/CD systems)

### June 9th, 2025, v2.20.4

**License Client:**

* in `LicenseManager.checkLicense()` -> rethrow LicenseSpringException types and their subtypes (fix for `gracePeriodDays` and `ignoreServerExceptions` config params)

### May 20th, 2025, v2.20.3

**License Client:**

* changed the default `EncryptedFileLicenseRepository` to save the license file only if fully written

### May 13th, 2025, v2.20.1

**License Client:**

* updated offline requests to use updated OAuthCredentials (instead of the unchanged config ones)

### May 12th, 2025, v2.19.2

**License Client:**

* added `LicenseManager.getOAuthCredentials` method to check the current OAuth client id and secret used (since config is a final class with final fields -> updating oauth credentials doesn't update the initial config)

### May 12th, 2025, v2.19.1

**License Client:**

* Added `LicenseManager.getOfflineLicenseContent` to get the response from [**Activate License (Offline Method)**](https://docs.licensespring.com/license-api/license-activation-and-deactivation/activate-license-offline-method)

### May 9th, 2025, v2.19.0

**License Client:**

* added `LicenseManager.changeOAuthCredentials` method
* added activate `LicenseManager.activateLicenseOffline` and `LicenseManager.deactivateLicenseOffline` methods
  * should be used for TESTING PURPOSES only
  * api references: [**Activate License (Offline Method)**](https://docs.licensespring.com/license-api/license-activation-and-deactivation/activate-license-offline-method), [**Deactivate License (Offline Method)**](https://docs.licensespring.com/license-api/license-activation-and-deactivation/deactivate-license-offline-method)
* added `LicenseManager.updateFromOfflineResponse` method for updating offline licences

**Floating Client:**

* added support for [**Floating Features**](https://docs.licensespring.com/license-entitlements/floating-features)

**All:**

* added `LicenseData.isBorrowed` and `LicenseData.borrowedUntil` fields
* added `LicenseFeature.allowNegativeConsumptions` field
* changed checking of `allowNegativeConsumptions` **to license and feature settings instead of sdk config**, deprecated config param

### May 6th, 2025, v2.18.5

**License Client & Floating Client:**

* `serviceUrlCertPath` can be a resource as well (or a file)

### May 6th, 2025, v2.18.4

**All:**

* added new util class in licensespring-core: Base64Codec - handles base64 related operations and ensures correct padding

### April 30th, 2025, v2.18.3

**License Client & Floating Client:**

* fixed a bug regarding the new `serviceUrlCertPath` configuration option

### April 30th, 2025, v2.18.2

**License Client**

* added `serviceUrlCertPath` configuration option when (goes with custom serviceUrl for verification purposes) - see [**Java Advanced Usage**](https://docs.licensespring.com/sdks/java-sdk/java-advanced-usage) **\*BUG WHEN USING THIS FEATURE, UPGRADE TO 2.81.3 OR NEWER TO USE IT\***
* added `License.isOfflineActivated` - when the license was activated offline or using air-gapped
* fixed offline licensing support when using OAuth
* updated offline activation - added support for variables and tracking machine info (if enabled in config)
* updated consumption sync:
  * syncs features for all license types if the features have consumtions
  * added unlimited consumptions support (feature and license)
* Added `LicenseData.allowUnlimitedActivations`

**Floating Client:**

* added `serviceUrlCertPath` configuration option when (goes with custom serviceUrl for verification purposes) - see [**Java Advanced Usage**](https://docs.licensespring.com/sdks/java-sdk/java-advanced-usage) **\*BUG WHEN USING THIS FEATURE, UPGRADE TO 2.81.3 OR NEWER TO USE IT\***

### April 17th, 2025, v2.18.1

**License Client:**

* licenseManager.activateLicense() - removed existing license modification when activating another license (like deleting in case the new license is not found)

### April 4th, 2025, v2.18.0

**Management Client:**

* Added metadata filtering capability to Management SDK Implemented metadata filtering for:
  * getLicenses
  * getLicenseProductFeatures
  * getOrders
  * getProducts

**License Client:**

* Added optional env query parameter to:
  * checkLicense
  * getProductDetails
  * getVersions
  * getInstallationFile
* Added optional licenseId param for users with multiple licences
* added `userLicenses` and `deviceLicenses` endpoints

**Floating Client:**

* Updated ProxyService to support the following floating server API methods:
  * setPassword
  * setKeys
  * serverHealthy
  * getLicense
  * addLicense
  * removeLicense
  * generateAirgapSignature
  * registerUser
  * unregisterUser
  * unregisterAllUsers
  * addConsumption
  * addFeatureConsumption

### March 3rd, 2025, v2.17.1

**License Client & Floating Client:**

* Added [**OAuth Authorization**](https://docs.licensespring.com/license-api/license-api-authorization/oauth-authorization) support by setting `clientId` and `clientSecret` in the Floating or LicenseSpring Configuration. Check out [**OAuth Configuration**](https://docs.licensespring.com/vendor-platform/settings/oauth-configuration) on how to setup. For rotating secrets, there is a changeOAuthClientSecret method in LicenseManager of FloatingLicenseService.

### February 12th, 2025, v2.17.0

**All:**

* Updated LicenseSpring sdk license and added dependancy licences to the .jar. More info here: [**SDK Distribution and Licensing**](https://docs.licensespring.com/sdks/java-sdk/sdk-distribution-and-licensing)

**License Client:**

* added `LicenseManager.getSsoUrl`
* added `LicenseManager.getAirGapDeactivationCode` and `LicenseManager.deactivateAirGapResponse`

**Management Client:**

* supports java 16+ (LocalDateAdapter)

### December 30th, 2024, v2.16.6

**License Client**:

* add `LicenseNotFoundException` and `LicenseNotEnabledException` for the appropriate license statuses
* `manager.checkLicense` will throw the appropriate exception and update the local license

### November 20th, 2024, v2.16.5

**License Client**:

* properly passed down LicenseRepository to LicenseService

### October 24th, 2024, v2.16.4

**All**:

* update `com.google.code.gson` to 2.11.0

**Floating Client:**

* added support for user based licences on borrowLicense method

### August 27th, 2024, v2.16.3

**License Client**:

* added missing customer fields (12 up from 7)

**Management Client:**

* remove orderBy `active_up_to_date_devices` - not supported anymore

### July 25th, 2024, v2.16.2

**Floating Client:**

* ProxyFloatingService.register() method should parse responses from newer floating-server versions (backwards compatible)

### June 26th, 2024, v2.16.1

**All:**

* update oshi version to 6.6.0

**License Client**:

* added configuration options to force signature v2 check

**Management Client:**

* added the following:
  * **LicenseService.updateFeatures**
  * **LicenseService.deleteLicense**
  * **OrderService.safeDeleteOrder**
* updated response type in **LicenseService.createOrder**

### May 29th, 2024, v2.16.0

**All**:

* Added **JsonElement metadata** field to: LicenseData, Customer, Product, LicenseFeature (licenseclient sdk and management sdk)
* Added **LicenseManager.getDeviceVariables(identity)**
* Added a parameter to the **LicenseManager.initialize()** method to accept **OkHttpClient.Builder** for customization of the underlying client (for a https proxy use case)

**Breaking Change:**

* **metadata** field in LicenseFeature model changed from **Object** type to **JsonElement**

### May 7th, 2024, v2.15.0

**All**:

* Added **LicenseUser** model and **user** field in **LicenseData** for user based licenses
* Added expiration check on **getCurrent()** calls while in offline mode
* Added fallback when detecting OS version

### April 16th, 2024, v2.14.0

**All**:

* Add **VerifySignatureDecoder** to enhance security by verifying signatures of server responses
* Set **active** and **enabled** fields to true after successfully performing local check
* Bump **org.bouncycastle.bcpkix-jdk18on, org.bouncycastle.bcprov-jdk18on** to **v1.78**
* Enhance license security by storing the **LicenseData** signature alongside the license file and conducting **signature verification upon loading the license** from the file

### January 19th, 2024, v2.13.0

**All**:

* Bump io.github.openfeign v12.4 -> v13.1
* Change scheduler mode to fixed-rate

**License Client**:

* Add CachedEncryptedLicenseRepository that caches license in-memory

### December 12th, 2023, v2.12.0

**Floating Client**:

* **FloatingLicenseService**:
  * Add **releaseFloatingFeature**
  * Add **checkLicenseFeature**

**License Client**:

* **LicenseService**:
  * Add **checkLicenseFeature**

**Management Client**:

* **FloatingFeaturesService**:
  * Add **releaseDevice**
  * Add **getLicenseProductFeature**
  * Add **getLicenseProductFeatures**
  * Add **updateFeatures**

### December 6th, 2023, v2.11.1

All

* **Compatibility with older Java versions:**
  * **v1.8u141 and older**: Trust LicenseSpring API Root certificate
  * **v1.8u161 and older**: Fallback to 128 bit key size because key size greater than 128 bit is not supported.
* **Deprecate disableSSL option**

### November 7th, 2023, v2.10.0

All

* **Proxy Certificate:** Users can provide .pem file certificate in order to configure HTTP client to trust Proxy Server certificate.
* **Connection Specs:** Users can provide connection specs to setup HTTP client with different cipher suites.

### October 12th, 2023, v2.9.0

Floating Client

* added Floating License borrowing

### September 14th, 2023, v2.8.6

All SDK's

* added `resetConsumption` and `consumptionPeriod` to `LicenseFeature` class

### July 10th, 2023, v2.8.3

All SDK's

* Changed the exception message (`ConnectionException`) when there are problems with proxy auth. New message is:
  * "Failed to authenticate with the proxy server. Please check your proxy credentials setup or contact your IT department for assistance."

### July 3rd, 2023, v2.8.2

All SDK's

* Added `id` and `deviceId` fields to the `LicenseData` class

### June 26th, 2023, v2.8.1

License Management

* Fix error decoder empty code and message fields

### April 28th, 2023, v2.8.0

License Management

* BREAKING: Changed single user to list of users in `OrderLicense` class
* Added `isManager` boolean field to `UserBasedLicense` class

### April 28th, 2023, v2.7.0

All SDK's

* Add support for parsing date when creating `ZonedDateTime` `License Client`
* Fixed `AirGapped` signatures

### March 17th, 2023, v2.6.2

Floating Client

* Fix when using only `checkLicense()` (without `activateLicense()` - example: on app restart)

### March 1st, 2023, v2.6.1

License Client

* Changed `AirGapped` to use Java classes instead of `BouncyCastle`

### February 28th, 2023, v2.6.0

All SDK's

* `licenseSignature` verification fix (pem files)

### January 30th, 2023, v2.5.9 - **BROKEN VERSION**

License Client

* Remove unused `BouncyCastle` provider in `AirGappedService`

### January 17th, 2023, v2.5.8 - **BROKEN VERSION**

License Client

* Renewed the code signing certificate

### January 16th, 2023, v2.5.7 - **BROKEN VERSION**

License Client

* Removed `BouncyCastle` provider for `AirGap` - use default provider

### January 10th, 2023, v2.5.6 - **BROKEN VERSION**

License Client

* Added support for multiple licenses on the same device. Added the `LicenseManagerFactory` for creating multiple `LicenseManager` objects (one for each different license)
* Added support for offline user-based licences

### November 4th, 2022, v2.5.5 - **BROKEN VERSION**

License Client

* Added `AirGappedService` and `LicenseSpringManager` methods: `getAirGapActivationCode()`, `verifyAirGapConfirmationCode()`, `activateAirGapResponse()`

### August 10th, 2022, v2.5.4

License Client

* Added `reinitialize()` methods to `LicenseManager`

### June 28th, 2022, v2.5.3

All SDK's

* Corrected query parameters on azure metadata endpoint

### June 10th, 2022, v2.5.2

All SDK's

* Added azure environment variable `WEBSITE_INSTANCE_ID` check to `HardwareIdStrategy.AUTO_NODE_LOCK`

### May 18th, 2022, v2.5.1

All SDK's

* Updated OSHI library to 6.1.6 version

### December 21st, 2021, v2.5.0

License Client and Floating Client

* Added verification on any kind of license load.

### December 20th, 2021, v2.4.16

License Client and Floating Client

* Added verification of license on every check call.

### December 14th, 2021, v2.4.15

All SDK's

* Added `HardwareIdStrategy.NO_DISK_HARDWARE_ID`, for creating hardware IDs without disk information (in case of removable card readers or similar devices that are detected as disks). For more information, see [**Java Hardware (Device) IDs**](https://docs.licensespring.com/sdks/java-sdk/java-hardware-_device_-ids)

### December 9th, 2021, v2.4.14

License Client

* Added `setOfflineMode` to `LicenseManager`.

License Client and Floating Client

* Added `infoToStore` configuration parameters. This enables to fine tune what information you want to send to LS servers during license activation and checking. If `storeMachineInfo` is off, then this property is ignored, defaults to ALL info. Docs are at the end of configuration optional parameters, see [**Java Modules**](https://docs.licensespring.com/sdks/java-sdk/java-modules) for the License Client module.

### November 22nd, 2021, v2.4.13

* Populated `lastUsage` field after license check (resolves issues when using offline mode after online activation)
* Added `storeMachineInfo` configuration parameter (`License` and Floating Configurations) - false by default. This toggles the collection of additional machine data, which includes:
  * `hostname`
  * `ipAddress`
  * `macAddress`
  * `vmInfo`
  * `osInfo`

### November 10th, 2021, v2.4.12

All SDK's

* Added `requestTimeout` to configurations (in seconds) for API calls, defaults to 10 seconds

### October 11th, 2021, v2.4.11

License Client

* Added fields to `LicenseFeature` class: `allowOverages`, `maxOverages`
* Added overages logic to `increaseConsumption()` and `increaseFeatureConsumption()` methods

### September 29th, 2021, v2.4.10

Management SDK

* Added fields to `ProductFeature` class: `allowOverages`, `maxOverages`, `resetConsumption`, `consumptionPeriod`

### August 27th, 2021, v2.4.9

All SDK's

* Added azure environment variable check (`WEBSITE_INSTANCE_ID`) for offline azure cloud instances
* Added `name` and `expiryDate` for `LicenseFeatures`

### June 29th, 2021, v2.4.8

All SDK's

* Added `shutdownScheduler()` method to client SDKs for manually shutting down the scheduled executors used for periodic checks, see [**Java Advanced Usage**](https://docs.licensespring.com/sdks/java-sdk/java-advanced-usage).

### June 24th, 2021, v2.4.7

All SDK's

* Added `Shutdown` hooks to all executor services (used when the periodic check feature is turned on)
* Added the `disableSsl` configuration option for rare cases when the app cannot verify LicenseSpring servers certificates. More info in [**Java Advanced Usage**](https://docs.licensespring.com/sdks/java-sdk/java-advanced-usage).

### June 9th, 2021, v2.4.6

All SDK's

* Added support for basic authentication when using a forward proxy. Just set `proxyUser` and `proxyPass` in any configuration object to use. More info in [**Java Advanced Usage**](https://docs.licensespring.com/sdks/java-sdk/java-advanced-usage).

### May 20th, 2021, v2.4.5

All SDK's

* Added support for AWS IMDSv2 node locking (was only IMDSv1)
* Additional fields to the `LicenseData` object:
  * `allowOverages`
  * `maxOverages`
  * `preventVm`
  * `isFloatingCloud`
  * `isFloating`
  * `transferCount`
  * `floatingInUseDevices`
  * `floatingInUse`
  * `resetConsumption`
  * `consumptionPeriod`

You can read the description of each field in the [**Javadoc & Downloads**](https://docs.licensespring.com/sdks/broken-reference) section.

Floating Client SDK

* Added on-premise floating server support! Documentation can be found on our [**Proxy Floating**](https://docs.licensespring.com/sdks/broken-reference) page.

Management SDK

* Added `licenseUsers` to the `DeviceLicense` object (used in the devices via `LicenseServices`)

### April 19th, 2021, v2.4.4

License Client

* Added `ignoreServerExceptions` field in `LicenseSpringConfiguration` - when enabled, it acts as `gracePeriodDays` (ignoring exceptions if SDK cannot connect to LS servers for `License` check), but without a time limit

### April 15th, 2021, v2.4.3

License Client

* Increased the maximum allowed for `gracePeriodDays` to 30 (was 5).

### April 13th, 2021, v2.4.2

All SDK's

* Added `Locale.ENGLISH` for query field name serialization (fix for Turkish locale)

Management SDK

* Changed field in the `Device` model - "license" is no longer just an ID, now it's an object with: `id`, `license_key`

### April 9th, 2021, v2.4.1

License Client

* Fixed an issue when in offline mode to check for clock tampering before setting the `lastUsage` (this is done during initialisation and on every `LicenseManager.getCurrent()` call) - you can also manually check for clock tampering in by calling `license.localCheck()`

### April 2nd, 2021, v2.4.0

This release introduces a multitude of changes made in the License Management module. A lot of DTO changes (request and response models). If you are using the **License Management** SDK, please update to the latest version since older API's are no longer supported or they had method signature changes.

#### BREAKING CHANGES

Management SDK

* Removed `assignUsers` method in `OrderService`. There is a new method with similar functionality in `LicenseService` called [**assignMultipleUsers**](https://docs.licensespring.com/sdks/broken-reference)
* The field `orderItems` in the search result of `searchOrders` method is now empty to cut down on length of the results. The field `orderItems` is still available for reading while using the `getOrder` method.
* `BackOfficeLicense` has a field product which isn't Long type anymore, instead it's a class `BackOfficeLicenseProduct`.
* Removed fields `companyName` and reference from `LicenseUser` class.
* Removed field `companyName` from `AssignUserToLicenseRequest` class.

Floating Client SDK

* Removed field `isCloudFloating` from `FloatingConfiguration` class. The field is redunant because floating/floating cloud configurations are separated in two classes: `ProxyConfiguration` and `FloatingConfiguration`.

#### Changelog

All SDK's

* Added support for a forward proxy! Just set `proxyPort` and `proxyHost` in any configuration object to use the forward proxy. More info in [**Java Advanced Usage**](https://docs.licensespring.com/sdks/java-sdk/java-advanced-usage)
* Updated oshi and feign libraries to their latest versions (5.6.1 and 11.1) - to fix some bugs on Windows

License Client

* Added deletion of local license file in `checkLicense()` method (invoked during initialisation too), in case of `license_not_found` response (this is the case of deleting a license)

Management SDK

* 3 new services added as a composition to existing management services:
  * `DeviceVariablesService` found in `LicenseService`
  * `LicenseCustomFieldsService` found in `LicenseService`
  * `ProductCustomFieldsService` found in `OrderService`
* All 3 (`DeviceVariablesService`, `LicenseCustomFieldsService`, `ProductCustomFieldsService`) have the following methods:
  * `search`
  * `get`
  * `create`
  * `update`
  * `delete`
  * `paginate`
* Added `enableRetrying` option to `ManagementConfiguration` (same functionality as in the other SDKs)
* New method `setUserPassword` in `LicenseService` class.
* Added prebuild check for `releaseDate` field in `CreateInstallationFileRequest` to check if it's in YYYY-MM-DD format.
* New fields in `BackOfficeCustomer` class :
  * `labels` - array of customers labels
  * `allLabelNames` - name of customers labels
  * `labelIds` - ids of customers labels
* New fields in `BackOfficeLicense` class:
  * `licenseUsers` - list of all users that use the license
  * `activeUpToDateDevices` - total number of devices that are currently using the license
  * `totalActiveDevices` - total number of devices that have status active on the license
  * `note` - note about the license
  * `maxLicenseUsers` - maximum number of users that can use the license
* New fields in `LicenseUser` class:
  * `isStaff` - boolean, is user also a part of the company staff
  * `subscribedToEmail` - boolean, is user subscribed to newsletter
  * `acquiredConsent` - date when consent was acquired
* New field in `AssignUserToLicenseRequest` class, `isManager` boolean field.
* New methods in `LicenseService` class:
  * `resetTotalConsumptions`
  * `setTotalConsumptions`
  * `assignMultipleUsers`
  * `unassignUser`
  * `blacklistDevice`
  * `resetDevice`
* New methods in `OrderService` class:
  * `searchInstallationFiles`
  * `getInstallationFile`
  * `createInstallationFile`
  * `paginateThroughAllInstallationFiles`
* New filters and sort options in search requests.

### September 25th, 2020, v.2.3.2

* Adapted the caching mechanism in the `License` class, so that both feature and license consumptions are first checked and then updated. (apriori)

### September 22nd, 2020, v.2.3.1

* Fixed issue with license feature consumption
* Added utility methods to check presence of features on `LicenseData` class
* Fixed wrong javadoc on the `LicenseManager` class, check method. Added more context for check method.

### September 18th, 2020, v.2.3.0

Online documentation

* Added Javadoc coverage information on online documentation per module & version
* Added a help page on [**Java Modules**](https://docs.licensespring.com/sdks/java-sdk/java-modules)

License Client

* Added offline de/activation methods with `InputStream` and `OutputStream` as parameters
* Fixed issue with offline activation response loading - wrong file name.

LicenseManager

* Added `patchLicense` method to modify product features on existing licenses.
* Added some javadoc
* Increased test coverage

### September 10th, 2020, v2.2.0

Core SDK

* Completely restructured online documentation
* Transitions to hosted [**Javadoc & Downloads**](https://docs.licensespring.com/sdks/broken-reference). The javadoc is still available for download via maven.
* Added node locking options for AWS and Azure Cloud(s)
* Refactored internal class packages
* Added a `Retryer` option, which enables retries of failed requests due to infrastructural reasons (connection issues, server 5xx errors) - up to 4 retries with the longest delay period of 20 seconds. Off by default.
* Expanded the `LicenseSpring Exception` model (note: the basic classes still remain, all extend from `LicenseSpringException`, and are still unchecked)
* Rewritten `@SuperBuilder` in configuration classes, to generate javadoc properly
* Added a delombok process, in order to add javadoc to auto-generated code
* Higher coverage with javadoc on all Java SDKs

License Client SDK

* Added a grace period configuration option, which resolves the remote `Check` services to a local license check with a grace period from 1 to 5 days. Note that the grace period applies only to the `Check` method and for infrastructural problems (connection, server error). License validation exceptions are still thrown. Default behaviour is off.
* Added throws `LicenseSpringException` to every `LicenseManager` method (unchecked)
* Enabled negative increments of consumptions - defaults to disabled in configuration.
* Removed the option to place orders from the Client SDKs.

Floating Client SDK

* Implemented an automated `Shutdown` hook background thread. The thread releases activated licenses and deactivates the license. By default the shutdown hook is enabled, and can be disabled
* Added a per-process (UUID) generated hardware ID strategy which works well with the floating license model.
* Defined a `CheckSubscriber` interface which can be used to subscribe to background check events. Default implementation ignores the incoming events.
* Added a background periodic check caller for all activated licenses. Deactivation removes the licenses from the pool. Period is 1/2 of the floating license duration. On by default.
* Tested support for multiple licenses and products at the same time. Multiple `FloatingLicenseServices` required for multiple products, multiple licenses on the same product can be used within the same `FloatingLicenseServices` instance.

Management SDK

* Implemented the following methods on `LicenseService`
  * `searchLicenses`
  * `disableAllLicenses`
  * `disableLicense`
  * `getLicense`
  * `updateLicense`
  * `assignUser`
  * `resetLicense`
  * `enableLicense`
  * `searchDevices`
  * `getDevice`
  * `paginateThroughAllLicenses`
* Implemented the following methods on `OrderService`
  * `searchOrders`
  * `getOrder`
  * `exportToCsv`
  * `assignUsers`
  * `generateLicenseKeys` (migrated from Webhook API)
  * `createOrder` (migrated from Webhook API)
  * `searchProducts`
  * `getProduct`
  * `paginateThroughAllOrders`
  * `paginateThroughAllProducts`

### July 28th, 2020, v2.1.0

* Added OSGi support

### July 15th, 2020, v2.0.2

* Removed oshi-demo from dependancy list
* Support in detecting AWS EC2 instances
* Added javadoc in `Floating SDK`

### July 15th, 2020, v2.0.0

* Java SDK was split into 4 different modules
* Manifest updated and created for each module - support for OSGI was added
* Added LICENSE file to distribution in jars
* Added support for floating licenses

Auto-Generated javadoc on deployment - ready for use in iDEs.

### June 12th, 2020, v1.9.3

* Refactored offline license request/response code from `LicenseRepository` into a separate class
* Made `LicenseRepository` an interface SDK users can implement.
* Added a `intitialize()` method overload on `LicenseSpringManager` which accepts the `LicenseRepository` as the second parameter.
* Added the default implementation of `LicenseRepository`, no SDK users will not need to change their implementation, unless building a custom `LicenseRepository`.
* Added some checks to prevent entering locking code when there is no need to sync consumptions with LicenseSpring servers.

### May 22nd, 2020, v1.9.2

* Fixed issues with consumptions and caching - the local consumption check was not performed with local state.
* Removed license deletion on initialization because of server errors. The SDK still deletes the license if the hardware key does not match the one in the license file. The `LicenseManager initialize()` method can now throw the `LicenseSpringException`, which the client should handle per use case basis.

### May 21st, 2020, v1.9.1

* Fixed bug with `daysRemaining` method on License. SUBSCRIPTION license returned max days, instead of CONSUMPTION type.

### May 8th, 2020, v1.9

* Fixed issues with OSHI auto-update version
* Added request logging options, default is OFF/NONE.
* Added more tests
* Refactored code

### May 1st, 2020, v1.8

* fixed issues with Version API
* implemented local cache for feature consumptions
* added consumption sync to standard check calls
* implemented periodic license check - can be enabled via configuration. Period of sync can also be specified.

### April 2nd, 2020, v1.7

* exposed `JsonSerialization` class

### March 29th, 2020, v1.6.

* Fixed omission of `generateTrialKey` overload with full customer details
* Implemented `Order` model

### March 19th, 2020, v1.4.

* Fixed bug in hardware key generation when no disk is mounted (e.g. VM)

### March 13th, 2020, v1.3

* Added javadoc
* Changed hardware key generation (might break some builds) - reactivate your license.
* Fixed minor issues on tracking OS name
* Fixed major issue with locale support

### February 28, 2020, v0.0.1

* Initial Release of the LicenseSpring Java SDK.
* There are issues with Offline activation, expected to be resolve by 7th of March, 2020.
