Class DeviceRegistrationService


  • @Named
    public class DeviceRegistrationService
    extends java.lang.Object
    Provides operations with user U2F devices
    Author:
    Yuriy Movchan Date: 05/14/2015
    • Constructor Detail

      • DeviceRegistrationService

        public DeviceRegistrationService()
    • Method Detail

      • addBranch

        public void addBranch​(java.lang.String userInum)
      • containsBranch

        public boolean containsBranch​(java.lang.String userInum)
      • prepareBranch

        public void prepareBranch​(java.lang.String userInum)
      • findUserDeviceRegistration

        public DeviceRegistration findUserDeviceRegistration​(java.lang.String userInum,
                                                             java.lang.String deviceId,
                                                             java.lang.String... returnAttributes)
      • findUserDeviceRegistrations

        public java.util.List<DeviceRegistration> findUserDeviceRegistrations​(java.lang.String userInum,
                                                                              java.lang.String appId,
                                                                              java.lang.String... returnAttributes)
      • findDeviceRegistrationsByKeyHandle

        public java.util.List<DeviceRegistration> findDeviceRegistrationsByKeyHandle​(java.lang.String appId,
                                                                                     java.lang.String keyHandle,
                                                                                     java.lang.String... returnAttributes)
      • findOneStepUserDeviceRegistration

        public DeviceRegistration findOneStepUserDeviceRegistration​(java.lang.String deviceId,
                                                                    java.lang.String... returnAttributes)
      • addUserDeviceRegistration

        public void addUserDeviceRegistration​(java.lang.String userInum,
                                              DeviceRegistration deviceRegistration)
      • attachUserDeviceRegistration

        public boolean attachUserDeviceRegistration​(java.lang.String userInum,
                                                    java.lang.String oneStepDeviceId)
      • addOneStepDeviceRegistration

        public void addOneStepDeviceRegistration​(DeviceRegistration deviceRegistration)
      • updateDeviceRegistration

        public void updateDeviceRegistration​(java.lang.String userInum,
                                             DeviceRegistration deviceRegistration)
      • disableUserDeviceRegistration

        public void disableUserDeviceRegistration​(DeviceRegistration deviceRegistration)
      • removeUserDeviceRegistration

        public void removeUserDeviceRegistration​(DeviceRegistration deviceRegistration)
      • getExpiredDeviceRegistrations

        public java.util.List<DeviceRegistration> getExpiredDeviceRegistrations​(io.jans.orm.model.BatchOperation<DeviceRegistration> batchOperation,
                                                                                java.util.Date expirationDate,
                                                                                java.lang.String[] returnAttributes,
                                                                                int sizeLimit,
                                                                                int chunkSize)
      • getCountDeviceRegistrations

        public int getCountDeviceRegistrations​(java.lang.String appId)
      • getDnForU2fDevice

        public java.lang.String getDnForU2fDevice​(java.lang.String userInum,
                                                  java.lang.String jsId)
        Build DN string for U2F user device
      • getBaseDnForU2fUserDevices

        public java.lang.String getBaseDnForU2fUserDevices​(java.lang.String userInum)
      • getDnForOneStepU2fDevice

        public java.lang.String getDnForOneStepU2fDevice​(java.lang.String deviceRegistrationId)
      • getKeyHandleHashCode

        public int getKeyHandleHashCode​(byte[] keyHandle)