public interface TrustedDeviceService extends Service
| Modifier and Type | Method and Description |
|---|---|
ActivateTrustedDeviceDTO |
activate(@NotNull TrustedDeviceActivationParams params)
Activates a trusted device by code or if a trusted device is required for activation then use the
TrustedDeviceActivationParams.DEVICE_ID and TrustedDeviceActivationParams.DEVICE_CONFIRMATION_ID
to ensure the corresponding device confirmation was already approved (using another trusted device). |
TrustedDeviceActivationData |
getActivationData()
Returns data required to activate a device for the logged user.
|
PasswordInputDTO |
getConfirmationPasswordInputForRemove(@NotNull java.lang.Long id)
Returns the
PasswordInputDTO for the confirmation password that would be required if removing the trusted
device with the given id |
TrustedDeviceData |
getData(long id)
Returns data about a trusted device.
|
java.util.List<TrustedDeviceVO> |
list(UserLocatorVO locator)
Returns the list of trusted devices for the given user (null resolves to the logged user).
|
void |
remove(java.lang.Long id,
java.lang.String confirmationPassword)
Removes a trusted device by id for the logged user.
|
RequestActivationResult |
requestActivationCode(@NotNull RequestDeviceActivationParams params)
Requests for an activation code.
|
void |
save(@NotNull TrustedDeviceDTO dto)
Updates a given trusted device for the logged user.
|
ActivateTrustedDeviceDTO activate(@NotNull @NotNull TrustedDeviceActivationParams params) throws FrameworkException
TrustedDeviceActivationParams.DEVICE_ID and TrustedDeviceActivationParams.DEVICE_CONFIRMATION_ID
to ensure the corresponding device confirmation was already approved (using another trusted device).FrameworkExceptionTrustedDeviceActivationData getActivationData() throws FrameworkException
FrameworkExceptionPasswordInputDTO getConfirmationPasswordInputForRemove(@NotNull @NotNull java.lang.Long id) throws FrameworkException
PasswordInputDTO for the confirmation password that would be required if removing the trusted
device with the given idFrameworkExceptionTrustedDeviceData getData(long id) throws FrameworkException
FrameworkExceptionjava.util.List<TrustedDeviceVO> list(UserLocatorVO locator) throws FrameworkException
Permission.USER_TRUSTED_DEVICES_VIEW permission.FrameworkExceptionvoid remove(java.lang.Long id,
java.lang.String confirmationPassword)
throws FrameworkException
FrameworkExceptionRequestActivationResult requestActivationCode(@NotNull @NotNull RequestDeviceActivationParams params) throws FrameworkException
RequestDeviceActivationParams.DEVICE_ID is given then the same existing code for that device
will be send again and the the name won't be changed (it's ignored if given). Otherwise, a new pending trusted
device will be created for the logged user and the code will be sent (in that case the name is required).
(phone / e-mail). If RequestDeviceActivationParams.MEDIUM is SendMedium.SMS then the message will
be send to the (required) RequestDeviceActivationParams#PHONE.FrameworkExceptionvoid save(@NotNull
@NotNull TrustedDeviceDTO dto)
throws FrameworkException
FrameworkException