Class ConnectionOptions.Builder

    • Constructor Detail

      • ConnectionOptions.Builder

        ConnectionOptions.Builder()
    • Method Detail

      • setChipAccessKeyFromCan

         ConnectionOptions.Builder setChipAccessKeyFromCan(String can)

        Sets the access key for the chip access procedure to authenticate to the chip of the eMRTD.

        Uses the Card Access Number (CAN) as the access key.

        Parameters:
        can - The Card Access Number.
        Returns:

        This instance of the builder for easier chaining.

      • setChipAccessKeyFromMrz

         ConnectionOptions.Builder setChipAccessKeyFromMrz(String documentNumber, String dateOfBirth, String dateOfExpiry)

        Sets the access key for the chip access procedure to authenticate to the chip of the eMRTD.

        Uses details from the MRZ as the access key.

        Parameters:
        documentNumber - The document number.
        dateOfBirth - The birth date of the document holder.
        dateOfExpiry - The expiry date of the document.
        Returns:

        This instance of the builder for easier chaining.

      • setChipAccessKey

         ConnectionOptions.Builder setChipAccessKey(ChipAccessKey chipAccessKey)

        Sets the access key for the chip access procedure to authenticate to the chip of the eMRTD.

        Parameters:
        chipAccessKey - The key to set.
        Returns:

        This instance of the builder for easier chaining.

      • setValidationId

         ConnectionOptions.Builder setValidationId(String validationId)

        Sets an unique string to identify the session.

        Parameters:
        validationId - The validation id.
        Returns:

        This instance of the builder for easier chaining.

      • setEnableDiagnostics

         ConnectionOptions.Builder setEnableDiagnostics(boolean enableDiagnostics)

        Enable or disable collection of diagnostics.

        When enabled, the DocVal server will collect and store extra diagnostic information to troubleshoot issues.

        This information may contain personal data, so only enable it if you have user consent.

        Parameters:
        enableDiagnostics - true to turn on diagnostics.
        Returns:

        This instance of the builder for easier chaining.

      • setBaggage

         ConnectionOptions.Builder setBaggage(Map<String, String> baggage)

        Sets the baggage entries that become the log context of the session in the DocVal server.

        The server adds the entries as fields to every log line of the session. It only takes keys that are on its allow-list.

        The entries go into the baggage header of the handshake, as defined by W3C Baggage. This method encodes the values, sorts the entries by key, and replaces a baggage header from setHttpHeaders. A key must be a token of RFC 7230 and a value must not be empty. An entry that the method cannot send is dropped with a warning in the log. The method never throws. null or an empty map removes the entries.

        Parameters:
        baggage - The baggage entries.
        Returns:

        This instance of the builder for easier chaining.

      • setHttpHeaders

         ConnectionOptions.Builder setHttpHeaders(Map<String, String> httpHeaders)

        Sets additional HTTP headers that will be set for the websocket connection.

        Can for example be used to set an Authorization header.

        Parameters:
        httpHeaders - The http headers.
        Returns:

        This instance of the builder for easier chaining.