Skip to content

Commit 0650744

Browse files
committed
docs: mark demo-only TLS trust and fence SDK wiring from server scaffolding in example
1 parent 2aa946c commit 0650744

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

sdk-example/src/main/kotlin/org/dexpace/sdk/example/ExampleApp.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ public class TlsServer internal constructor(
117117
public fun newTransportTrusting(): OkHttpTransport {
118118
val client =
119119
OkHttpClient.Builder()
120+
// Demo only: trusts a single self-signed certificate so the sample needs no
121+
// network. Production callers should rely on the default system trust store and
122+
// not configure custom trust material here.
120123
.sslSocketFactory(
121124
clientCertificates.sslSocketFactory(),
122125
clientCertificates.trustManager,
@@ -196,6 +199,9 @@ public fun main() {
196199
installIoProvider()
197200
val serde = JacksonSerde.withDefaults()
198201

202+
// ---- Demo scaffolding: fake the server so the sample is deterministic and network-free. ----
203+
// Everything in this `tls.server.use { ... }` block stands in for a real backend; a caller
204+
// wiring the SDK against a live API would not write any of it.
199205
val tls = newTlsServer()
200206
tls.server.use { server ->
201207
// Canned JSON the SDK will deserialize back into a typed `User`.
@@ -211,6 +217,7 @@ public fun main() {
211217
)
212218
server.start()
213219

220+
// ---- SDK wiring: this is the copyable part a real caller would actually write. ----
214221
tls.newTransportTrusting().use { transport ->
215222
val pipeline = buildPipeline(transport)
216223
val endpoint = server.url("/v1/users").toUrl()

0 commit comments

Comments
 (0)