Class ConnectionOptions.Builder
-
- All Implemented Interfaces:
public class ConnectionOptions.Builder
A builder to create connection options for the EmrtdConnector.
-
-
Constructor Summary
Constructors Constructor Description ConnectionOptions.Builder()
-
Method Summary
Modifier and Type Method Description ConnectionOptions.Builder
setChipAccessKeyFromCan(String can)
Sets the access key for the chip access procedure to authenticate to the chip of the eMRTD. 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. ConnectionOptions
build()
Build the connection options. ConnectionOptions.Builder
setChipAccessKey(ChipAccessKey chipAccessKey)
Sets the access key for the chip access procedure to authenticate to the chip of the eMRTD. ConnectionOptions.Builder
setValidationId(String validationId)
Sets an unique string to identify the session. ConnectionOptions.Builder
setEnableDiagnostics(boolean enableDiagnostics)
Enable or disable collection of diagnostics. ConnectionOptions.Builder
setHttpHeaders(Map<String, String> httpHeaders)
Sets additional HTTP headers that will be set for the websocket connection. -
-
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.
-
build
ConnectionOptions build()
Build the connection options.
- Returns:
The connection options.
-
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.
-
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.
-
-
-
-