@qualithm/device - v0.12.2
    Preparing search index...

    Function enrollDeviceCertificate

    • Generate a key/CSR and submit it to obtain an mTLS certificate credential, returning a new DeviceCredential with kind: "cert" ready for persistence and connecting.

      Parameters

      • provisioningUrl: string

        Base URL of the provisioning API.

      • credential: DeviceCredential

        The device's existing token credential, used to authenticate the enrollment request.

      • Optionalrequest: EnrollRequest

        Optional certificate label/lifetime.

      Returns Promise<DeviceCredential>

      EnrollError when credential has no token, or the endpoint is unreachable or rejects the CSR.