-
- All Implemented Interfaces:
-
com.yubico.yubikit.core.YubiKeyDevice
public class NfcYubiKeyDevice implements YubiKeyDevice
-
-
Constructor Summary
Constructors Constructor Description NfcYubiKeyDevice(Tag tag, int timeout, ExecutorService executorService)Instantiates session for nfc tag interaction
-
Method Summary
Modifier and Type Method Description TaggetTag()Array<byte>readNdef()voidremove(Runnable onRemoved)Closes the device and waits for physical removal. TransportgetTransport()booleansupportsConnection(Class<out YubiKeyConnection> connectionType)<T extends YubiKeyConnection> TopenConnection(Class<T> connectionType)<T extends YubiKeyConnection> voidrequestConnection(Class<T> connectionType, Callback<Result<T, IOException>> callback)booleanisYubiKey()Probe the nfc device whether it is a Yubico hardware. StringtoString()-
-
Constructor Detail
-
NfcYubiKeyDevice
NfcYubiKeyDevice(Tag tag, int timeout, ExecutorService executorService)
Instantiates session for nfc tag interaction- Parameters:
tag- the tag that has been discoveredtimeout- timeout, in milliseconds, to use for NFC communication
-
-
Method Detail
-
remove
void remove(Runnable onRemoved)
Closes the device and waits for physical removal.
This method signals that we are done with the device and can be used to wait for the user tophysically remove the YubiKey from NFC scan range, to avoid triggering NFC YubiKey detectionmultiple times in quick succession.
-
getTransport
Transport getTransport()
-
supportsConnection
boolean supportsConnection(Class<out YubiKeyConnection> connectionType)
-
openConnection
<T extends YubiKeyConnection> T openConnection(Class<T> connectionType)
-
requestConnection
<T extends YubiKeyConnection> void requestConnection(Class<T> connectionType, Callback<Result<T, IOException>> callback)
-
isYubiKey
boolean isYubiKey()
Probe the nfc device whether it is a Yubico hardware.
-
-
-
-