read
Read travel document. First it executes appropriate access control method (BAC/PACE). Then it authenticates data and chip, and finally it returns travel document created from read Data Groups. This operation should be called on a background thread. Ongoing reading can be canceled by invoking the cancel method.
Return
Travel document data read from Data Groups stored on NFC chip.
Parameters
Travel document NFC tag.
Password for accessing the chip.
Random 8 bytes. If the Active Authentication challenge is set, Active Authentication protocol will be used for the authentication of the chip (if supported by the chip). Response (signature) will be returned in the TravelDocument data class. This response should be validated by the application server to verify the authenticity of the chip. In case when the Active Authentication protocol is not supported by the chip, the chip will be authenticated the same way as if the argument activeAuthenticationChallenge is not set.
Throws
If activeAuthenticationChallenge has invalid size.
If access to the chip data is denied either by PACE or BAC protocol.
If authentication of the chip using the Chip Authentication protocol fails. Secure connection was not established.
If NFC reading fails due to an NFC tag connection failure.
If reading fails due to any other reason.
Read travel document. First it executes appropriate access control method (BAC/PACE). Then it authenticates data and chip, and finally it returns travel document created from read Data Groups. This operation should be called on a background thread. Ongoing reading can be canceled by invoking the cancel method.
Parameters
Travel document NFC tag.
Password for accessing the chip.
Random 8 bytes. If the Active Authentication challenge is set, Active Authentication protocol will be used for the authentication of the chip (if supported by the chip). Response (signature) will be returned in the TravelDocument data class. This response should be validated by the application server to verify the authenticity of the chip. In case when the Active Authentication protocol is not supported by the chip, the chip will be authenticated the same way as if the argument activeAuthenticationChallenge is not set.
Status of the process will be reported to these listeners as well as the resulting travel document. For more information see Listeners.
Throws
If activeAuthenticationChallenge has invalid size.
If access to the chip data is denied either by PACE or BAC protocol.
If authentication of the chip using the Chip Authentication protocol fails. Secure connection was not established.
If NFC reading fails due to an NFC tag connection failure.
If reading fails due to any other reason.
Deprecated
Use method `read(tag: Tag, password: Password, activeAuthenticationChallenge: ByteArray?)` instead.
Deprecated
Use method `read(tag: Tag, password: Password, activeAuthenticationChallenge: ByteArray?, listeners: Listeners)` instead.