Class EmrtdReader
-
- All Implemented Interfaces:
public class EmrtdReaderHandles an eMRTD Session from start to finish in accordance to ICAO Doc 9303.
- Initialize with a StepProgressListener to get notified about the current step and file read progress.
- Provide a Master List to readMasterList to verify the eMRTD.
- Use readAndVerify or read to access the eMRTD and return a EmrtdResult.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumEmrtdReader.ReadAndVerifyStepEnum cases of the individual steps during an eMRTD session.
public classEmrtdReader.EmrtdReaderExceptioneMRTD Session was not successful. Query getMessage for details.
public interfaceEmrtdReader.StepProgressListenerListener to listen to the current step and current progress during an eMRTD Session.
-
Field Summary
Fields Modifier and Type Field Description public static Tracertracer
-
Constructor Summary
Constructors Constructor Description EmrtdReader(EmrtdReader.StepProgressListener stepProgressListener)Initialize an EmrtdReader. EmrtdReader()Initialize an EmrtdReader without providing an StepProgressListener implementation.
-
Method Summary
Modifier and Type Method Description static TracergetTracer()Gets the currently used OpenTelemetry tracer. static voidsetTracerProvider(TracerProvider tracerProvider)Sets a OpenTelemetry tracer provider that is used to provide traces. voidreadMasterList(Array<InputStream> masterListFileInputStreams)Read one or multiple MasterList file(s) from the given InputStream(s). EmrtdResultreadAndVerify(IsoDep isoDep, String documentNumber, String dateOfBirth, String dateOfExpiry)Read and verify an eMRTD. EmrtdResultread(IsoDep isoDep, String documentNumber, String dateOfBirth, String dateOfExpiry)Read an eMRTD. EmrtdResultreadAndVerify(IsoDep isoDep, String can)Read and verify an eMRTD. EmrtdResultread(IsoDep isoDep, String can)Read an eMRTD. -
-
Constructor Detail
-
EmrtdReader
EmrtdReader(EmrtdReader.StepProgressListener stepProgressListener)
Initialize an EmrtdReader.
- Parameters:
stepProgressListener- listener implementation will be notified when the eMRTD Sessionstatus changes and will be informed on file read progress.
-
EmrtdReader
EmrtdReader()
Initialize an EmrtdReader without providing an StepProgressListener implementation. You will not be informed about Step and Progress updates.
-
-
Method Detail
-
getTracer
static Tracer getTracer()
Gets the currently used OpenTelemetry tracer.
- Returns:
The tracer.
-
setTracerProvider
static void setTracerProvider(TracerProvider tracerProvider)
Sets a OpenTelemetry tracer provider that is used to provide traces. If none is set, a no-op implementation is used.
- Parameters:
tracerProvider- The provider to set.
-
readMasterList
void readMasterList(Array<InputStream> masterListFileInputStreams)
Read one or multiple MasterList file(s) from the given InputStream(s).
A MasterList contains a list of trusted Country Certificates. With these Certificates it is possible to verify whether an eMRTD was officially produced on behalf of the nation that issued it and whether the data it contains has been changed in any way since its production.
- Parameters:
masterListFileInputStreams- one InputStream or multiple InputStream.
-
readAndVerify
EmrtdResult readAndVerify(IsoDep isoDep, String documentNumber, String dateOfBirth, String dateOfExpiry)
Read and verify an eMRTD.
- Parameters:
isoDep- IsoDep of an ISO7816 Tag with the eMRTD applet.documentNumber- document number from the MRZ.dateOfBirth- date of birth from the MRZ (Format: yyMMDD)dateOfExpiry- date of expiry from the MRZ (Format: yyMMDD)- Returns:
EmrtdResult holding eMRTD data and check results
-
read
EmrtdResult read(IsoDep isoDep, String documentNumber, String dateOfBirth, String dateOfExpiry)
Read an eMRTD.
- Parameters:
isoDep- IsoDep of an ISO7816 Tag with the eMRTD applet.documentNumber- document number from the MRZ.dateOfBirth- date of birth from the MRZ (Format: yyMMDD)dateOfExpiry- date of expiry from the MRZ (Format: yyMMDD)- Returns:
EmrtdResult holding eMRTD data
-
readAndVerify
EmrtdResult readAndVerify(IsoDep isoDep, String can)
Read and verify an eMRTD.
- Parameters:
isoDep- IsoDep of an ISO7816 Tag with the eMRTD applet.can- CAN, a 6 digit number, printed on the front of the document.- Returns:
EmrtdResult holding eMRTD data and check results
-
read
EmrtdResult read(IsoDep isoDep, String can)
Read an eMRTD.
- Parameters:
isoDep- IsoDep of an ISO7816 Tag with the eMRTD applet.can- CAN, a 6 digit number, printed on the front of the document.- Returns:
EmrtdResult holding eMRTD data
-
-
-
-