TrustPinConfiguration

data class TrustPinConfiguration(val organizationId: String, val projectId: String, val publicKey: String, val mode: TrustPinMode = TrustPinMode.STRICT, val configurationURL: URL? = null)(source)

Configuration for a TrustPin instance.

Encapsulates all the parameters needed to initialise a TrustPin instance. Pass an instance of this class to TrustPin.setup or provide it when creating a named instance via TrustPin.instance.

Example

val config = TrustPinConfiguration(
organizationId = "my-org",
projectId = "my-project",
publicKey = "MFkwEwYH...", // base64-encoded ECDSA P-256
mode = TrustPinMode.STRICT
)

// Single-instance usage
TrustPin.default.setup(config)

// Multi-instance usage
val pin = TrustPin.instance("payments")
pin.setup(config)

Constructors

Link copied to clipboard
constructor(organizationId: String, projectId: String, publicKey: String, mode: TrustPinMode = TrustPinMode.STRICT, configurationURL: URL? = null)

Properties

Link copied to clipboard

Optional custom URL for fetching the signed payload (JWS). CDN-managed projects should leave this null.

Link copied to clipboard

Pinning mode controlling behaviour for unregistered domains.

Link copied to clipboard

Your organization identifier from the TrustPin dashboard.

Link copied to clipboard

Your project identifier from the TrustPin dashboard.

Link copied to clipboard

Base64-encoded ECDSA P-256 public key for signature verification.