Package 

Class UsbYubiKeyDevice

  • All Implemented Interfaces:
    com.yubico.yubikit.core.YubiKeyDevice , java.io.Closeable , java.lang.AutoCloseable

    
    public class UsbYubiKeyDevice
     implements YubiKeyDevice, Closeable
                        
    • Constructor Summary

      Constructors 
      Constructor Description
      UsbYubiKeyDevice(UsbManager usbManager, UsbDevice usbDevice) Creates the instance of usb session to interact with the yubikey device.
    • Method Summary

      Modifier and Type Method Description
      UsbDevice getUsbDevice() Returns yubikey device attached to the android device with the android device acting as the USBhost.
      void setOnClosed(Runnable onClosed)
      boolean hasPermission()
      UsbPid getPid()
      Transport getTransport()
      boolean supportsConnection(Class<out YubiKeyConnection> connectionType)
      <T extends YubiKeyConnection> void requestConnection(Class<T> connectionType, Callback<Result<T, IOException>> callback)
      <T extends YubiKeyConnection> T openConnection(Class<T> connectionType)
      void close()
      String toString()
      • Methods inherited from class com.yubico.yubikit.core.YubiKeyDevice

        getTransport, openConnection, requestConnection, supportsConnection
      • Methods inherited from class java.io.Closeable

        close
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UsbYubiKeyDevice

        UsbYubiKeyDevice(UsbManager usbManager, UsbDevice usbDevice)
        Creates the instance of usb session to interact with the yubikey device.
        Parameters:
        usbManager - UsbManager for accessing USB devices
        usbDevice - device connected over usb that has permissions to interact with