WebDidConfig

data class WebDidConfig(val requireHttps: Boolean = true, val documentPath: String = "/.well-known/did.json", val timeoutSeconds: Int = 30, val followRedirects: Boolean = false, val additionalProperties: Map<String, Any?> = emptyMap())

Configuration for did:web method implementation.

Follows W3C did:web specification for HTTP/HTTPS-based DID resolution.

Example Usage:

val config = WebDidConfig.builder()
.requireHttps(true)
.documentPath("/.well-known/did.json")
.build()

Constructors

Link copied to clipboard
constructor(requireHttps: Boolean = true, documentPath: String = "/.well-known/did.json", timeoutSeconds: Int = 30, followRedirects: Boolean = false, additionalProperties: Map<String, Any?> = emptyMap())

Types

Link copied to clipboard
class Builder

Builder for WebDidConfig.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Additional configuration properties.

Link copied to clipboard

Path to DID document (default: "/.well-known/did.json"). Per W3C spec, documents should be hosted at /.well-known/did.json

Link copied to clipboard

Whether resolution follows HTTP redirects (default: false). When enabled, WebDidMethod follows at most WebDidMethod.MAX_REDIRECTS hops manually, re-checking HTTPS and the SSRF guard on every hop; the HTTP client's own redirect handling is never used.

Link copied to clipboard

Whether HTTPS is required for document hosting (default: true). Per W3C spec, did:web requires HTTPS.

Link copied to clipboard

Upper bound, in seconds, on each resolution request (applied by WebDidMethod as an OkHttp call timeout; the SPI provider also uses it for connect/read/write timeouts when it builds the client). Default: 30. 0 or less leaves the client's own timeouts alone.

Functions

Link copied to clipboard
open override fun toString(): String

Prints only the keys of additionalProperties: its values may carry credentials.