Class DeviceRegistrationService
- java.lang.Object
-
- io.jans.as.server.service.fido.u2f.DeviceRegistrationService
-
@Named public class DeviceRegistrationService extends java.lang.Object
Provides operations with user U2F devices- Author:
- Yuriy Movchan Date: 05/14/2015
-
-
Constructor Summary
Constructors Constructor Description DeviceRegistrationService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBranch(java.lang.String userInum)
void
addOneStepDeviceRegistration(DeviceRegistration deviceRegistration)
void
addUserDeviceRegistration(java.lang.String userInum, DeviceRegistration deviceRegistration)
boolean
attachUserDeviceRegistration(java.lang.String userInum, java.lang.String oneStepDeviceId)
boolean
containsBranch(java.lang.String userInum)
void
disableUserDeviceRegistration(DeviceRegistration deviceRegistration)
java.util.List<DeviceRegistration>
findDeviceRegistrationsByKeyHandle(java.lang.String appId, java.lang.String keyHandle, java.lang.String... returnAttributes)
DeviceRegistration
findOneStepUserDeviceRegistration(java.lang.String deviceId, java.lang.String... returnAttributes)
DeviceRegistration
findUserDeviceRegistration(java.lang.String userInum, java.lang.String deviceId, java.lang.String... returnAttributes)
java.util.List<DeviceRegistration>
findUserDeviceRegistrations(java.lang.String userInum, java.lang.String appId, java.lang.String... returnAttributes)
java.lang.String
getBaseDnForU2fUserDevices(java.lang.String userInum)
int
getCountDeviceRegistrations(java.lang.String appId)
java.lang.String
getDnForOneStepU2fDevice(java.lang.String deviceRegistrationId)
java.lang.String
getDnForU2fDevice(java.lang.String userInum, java.lang.String jsId)
Build DN string for U2F user devicejava.util.List<DeviceRegistration>
getExpiredDeviceRegistrations(io.jans.orm.model.BatchOperation<DeviceRegistration> batchOperation, java.util.Date expirationDate, java.lang.String[] returnAttributes, int sizeLimit, int chunkSize)
int
getKeyHandleHashCode(byte[] keyHandle)
void
merge(DeviceRegistration device)
void
prepareBranch(java.lang.String userInum)
void
removeUserDeviceRegistration(DeviceRegistration deviceRegistration)
void
updateDeviceRegistration(java.lang.String userInum, DeviceRegistration deviceRegistration)
-
-
-
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)
-
merge
public void merge(DeviceRegistration device)
-
-