Class FidoService

java.lang.Object
io.jans.casa.plugins.authnmethod.service.FidoService

public class FidoService extends Object
Author:
jgomer
  • Constructor Details

    • FidoService

      public FidoService()
  • Method Details

    • updateDevice

      public boolean updateDevice(FidoDevice device, String userInum)
    • removeDevice

      public boolean removeDevice(FidoDevice device, String userId)
    • getDevicesTotal

      public int getDevicesTotal(String appId, String userId, boolean active)
    • getLatestFidoDevice

      public <T extends FidoDevice> T getLatestFidoDevice(String userId, long time, String oxApp, Class<T> clazz) throws Exception
      Throws:
      Exception
    • getRecentlyCreatedDevice

      public static <T extends FidoDevice> T getRecentlyCreatedDevice(List<T> devices, long time)
      Chooses one device from a list of devices, such that its creation time is the closest to the timestamp given and falls one minute before the timestamp
      Type Parameters:
      T -
      Parameters:
      devices - A non-null list of fido devices
      time - A timestamp as milliseconds elapsed from the "epoch"
      Returns:
      The best matching device (only devices added before the time supplied are considered). Null if no suitable device could be found
    • getPropertyValue

      public String getPropertyValue(String key)