public interface DeviceConfirmationServiceLocal extends DeviceConfirmationService
DEVICE_CONFIRMATION_VALUE_PREFIX| Modifier and Type | Method and Description |
|---|---|
TrustedDevice |
check(long confirmationId,
CreateDeviceConfirmationParams params)
Checks if the confirmation was APPROVED and also its QR-content matches the generated
from the
CreateDeviceConfirmationParams parameter. |
void |
checkExists(java.lang.Long deviceConfirmationId)
Checks that a device confirmation with the given id exists, throwing
EntityNotFoundException if not. |
DeviceConfirmationVO |
create(CreateDeviceConfirmationParams params,
BasicUser creatorUser,
BasicUser ownerUser,
boolean unmaskIds)
Creates a new pending for approval device confirmation for the owner user.
|
static BasicUser |
getCreatorUserAttr(CreateDeviceConfirmationParams params)
The creator user attribute is used in some cases where the confirmation's owner user is different than the user
who created the confirmation (e.g in a receive payment the creator is the payee)
|
java.util.Map<MessageKey,java.lang.Object> |
getQRFields(DeviceConfirmationType type,
java.util.Map<DeviceConfirmationField,java.lang.Object> canonicalValues)
Returns a map with the fields used to generated the QR content for a given device confirmation type
|
default boolean |
isDeviceConfirmation(java.lang.String confirmationPassword)
Returns true if the password represents a device confirmation.
|
static void |
setCreatorUserAttr(CreateDeviceConfirmationParams params,
BasicUser user) |
TrustedDevice |
validate(long id,
long deviceId,
java.lang.String hmac)
Validates a PENDING confirmation with a device to ensure the device is a valid trusted device.
|
approve, barcode, create, getApprovalData, load, reject, removestatic BasicUser getCreatorUserAttr(CreateDeviceConfirmationParams params)
static void setCreatorUserAttr(CreateDeviceConfirmationParams params, BasicUser user)
TrustedDevice check(long confirmationId, CreateDeviceConfirmationParams params) throws InvalidDeviceConfirmationException
CreateDeviceConfirmationParams parameter. Also, if the confirmation was found and is approved
then it's removed.InvalidDeviceConfirmationException - if the confirmation was not found or is invalid. The possible values
contained in the exception are: InvalidDeviceConfirmationResult.INVALID_CONFIRMATION and
InvalidDeviceConfirmationResult.MAX_CHECK_ATTEMPTS_REACHED.void checkExists(java.lang.Long deviceConfirmationId)
EntityNotFoundException if not.DeviceConfirmationVO create(CreateDeviceConfirmationParams params, BasicUser creatorUser, BasicUser ownerUser, boolean unmaskIds)
java.util.Map<MessageKey,java.lang.Object> getQRFields(DeviceConfirmationType type, java.util.Map<DeviceConfirmationField,java.lang.Object> canonicalValues)
canonicalValues - the values obtained after parsing the CreateDeviceConfirmationParams.FIELDS map
NOTE: This method is used by the associated junit-test class (that was the reason to be placed in the local
interface)default boolean isDeviceConfirmation(java.lang.String confirmationPassword)
TrustedDevice validate(long id, long deviceId, java.lang.String hmac) throws InvalidDeviceConfirmationException
DeviceConfirmationService.approve(long, long, String) but immediately remove the
confirmation and do not send any push-notification if the validation success.InvalidDeviceConfirmationException