public interface TrustedDeviceService extends Service
| Modifier and Type | Method and Description |
|---|---|
ActivateTrustedDeviceDTO |
activate(@NotNull java.lang.String code)
Activates the trusted device with the given code for the logged user.
|
TrustedDeviceActivationData |
getActivationData()
Returns data required to activate a device for the logged user.
|
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)
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 java.lang.String code) throws FrameworkException
FrameworkExceptionTrustedDeviceActivationData getActivationData() throws FrameworkException
FrameworkExceptionTrustedDeviceData 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)
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