You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+54-6Lines changed: 54 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,10 +13,24 @@ It includes examples for the most important licensing, analytics, and resilience
13
13
* response and file integrity validation
14
14
* error handling and retry logic
15
15
16
-
For more information, see the [SLASCONE website](https://slascone.com/), the [support center](https://support.slascone.com/), and the [SLASCONE API](https://api365.slascone.com/swagger).
16
+
For more information, see the [SLASCONE website](https://slascone.com/), the [Help Center](https://support.slascone.com/), and the [API Test Center](https://api365.slascone.com/swagger).
17
+
18
+
## Quick Start
19
+
20
+
```bash
21
+
# Build the project
22
+
mvn clean compile
23
+
24
+
# Run the interactive sample
25
+
cd slascone-provisioning-sample
26
+
mvn exec:java
27
+
```
28
+
29
+
The application starts with an interactive menu. By default, it connects to a SLASCONE demo environment so you can explore the licensing and analytics scenarios immediately.
17
30
18
31
## Table of Contents
19
32
33
+
*[Quick Start](#quick-start)
20
34
*[What This Sample Demonstrates](#what-this-sample-demonstrates)
21
35
*[Getting Started](#getting-started)
22
36
*[Connecting to Your SLASCONE Environment](#connecting-to-your-slascone-environment)
@@ -44,6 +58,27 @@ This sample application showcases the following key features of the SLASCONE lic
44
58
* Sends periodic license verification requests to the SLASCONE server
45
59
* Retrieves up-to-date license information including features, limitations, and expiration details
46
60
* Caches license information for offline use
61
+
62
+
```java
63
+
// Build the heartbeat request with the current device and product info
64
+
AddHeartbeatDto heartbeat =newAddHeartbeatDto()
65
+
.clientId(DeviceInfoService.getUniqueDeviceId())
66
+
.productId(UUID.fromString(Settings.PRODUCT_ID))
67
+
.softwareVersion("25.2.0");
68
+
69
+
// Execute with automatic retry logic for transient failures
// The signature was verified — the cached data has not been tampered with
99
+
// Use licenseInfo to enforce features, limitations, and expiration as usual
100
+
} else {
101
+
// No valid cached license available (missing, expired, or tampered)
102
+
}
103
+
```
57
104
58
105
**License Unassignment**
59
106
* Demonstrates how to unassign a license from a device
@@ -144,7 +191,7 @@ To connect it to your own SLASCONE environment, adjust the values in `Settings.j
144
191
145
192
You can find these values as explained [here](https://support.slascone.com/hc/en-us/articles/360016153358#common-parameters). For meaningful testing and evaluation, your SLASCONE environment should have at least one active license.
146
193
147
-
Keep provisioning keys secure and do not embed production secrets in publicly accessible repositories. More about secrets, see the [Secrets](https://support.slascone.com/hc/en-us/articles/7702036319261#secrets) section in the SLASCONE Help Center.
194
+
> ⚠️ **Security Warning**: Keep provisioning keys secure and do not embed production secrets in publicly accessible repositories. More about secrets, see the [Secrets](https://support.slascone.com/hc/en-us/articles/7702036319261#secrets) section in the SLASCONE Help Center.
148
195
149
196
## Typical Licensing Flow
150
197
@@ -311,7 +358,7 @@ The `ErrorHandlingHelper` classifies API errors into three categories.
311
358
2.**Technical Errors (HTTP 4xx and 5xx)**
312
359
313
360
* Represent server-side or request issues such as internal server errors, bad gateways, or service unavailability
314
-
* Transient HTTP errors such as `408`, `429`, `500`, `502`, `503`, `504`, and `507` are automatically retried
361
+
* Transient HTTP errors such as `408`, `429`, `502`, `503`, `504`, and `507` are automatically retried
315
362
* Non-transient errors such as `401`, `403`, or `404` are returned immediately without retry
316
363
3.**Network Errors**
317
364
@@ -452,14 +499,15 @@ slascone-demo-java/
452
499
│ │ ├── Model/ # Data models specific to the sample application
453
500
│ │ └── Program/ # Main program and helper classes
454
501
│ ├── assets/ # License file examples
502
+
│ ├── lib/ # Additional library references
455
503
│ └── pom.xml # Maven configuration for the sample
456
504
├── slascone-client/ # Generated API client module
457
505
│ ├── src/main/java/ # Auto-generated API client code
458
506
│ ├── docs/ # API documentation
459
507
│ └── pom.xml # Maven configuration for the client
508
+
├── .devcontainer/ # Development container configuration
460
509
├── pom.xml # Parent Maven configuration
461
-
├── run.sh # Convenience script to run the application
462
-
└── build-and-run.sh # Script to build and run the application
510
+
└── run.sh # Convenience script to run the application
463
511
```
464
512
465
513
## API Client
@@ -483,7 +531,7 @@ If you use the generated client in your own application, it is recommended to ke
0 commit comments