This class takes an
AuthenticationGiftRegistryBOD as an input parameter. The
AuthenticationGiftRegistryBOD must contain a gift registry ExternalId. A password is optional. If no password is supplied, the user is validated on the basis that:
- They have already been authenticated (and we have history of it in the GiftRegistryContext).
- they are a Registrant/Co-Registrant on this registry (The GiftRegistryRegistrantDataBean.getUserId(). value is checked against the users Id in the GiftRegistryContext
Logic:
If the
AuthenticationGiftRegistryBOD has a password, then
- 1) The password is validated against the gift registry
If the
AuthenticationGiftRegistryBOD has no password, then
- 1) we check to see if this registry exists inside the users Context already
- 2) we check to see if this registry is owned by this user
Result:
ConfirmAuthenticationGiftRegistryBOD
On Success: It only contains a success message:
getConfirmation().equals(Confirmation.SUCCESS)
On Failure: an ECApplicationException is thrown. Possible messages include:
- GiftRegistryMessage._ERR_EC_AUTHENTICATION_PASSWORD_FAILED
- GiftRegistryMessage._ERR_EC_AUTHENTICATION_PASSWORD_REQUIRED