Class AnonPasswordResetService
java.lang.Object
dev.getelements.elements.service.user.AnonPasswordResetService
- All Implemented Interfaces:
PasswordResetService
Anonymous implementation of
PasswordResetService.
Both requestReset(java.lang.String, java.lang.String) and completeReset(java.lang.String, java.lang.String) are public operations that require no
authentication — the reset flow itself serves as proof of email ownership.
-
Field Summary
Fields inherited from interface dev.getelements.elements.sdk.service.user.PasswordResetService
PASSWORD_RESET_COMPLETED_EVENT, PASSWORD_RESET_REQUESTED_EVENT, RESET_BASE_URL, RESET_EMAIL_SUBJECT, RESET_EMAIL_TEMPLATE, RESET_TOKEN_EXPIRY_HOURS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcompleteReset(String token, String newPassword) Completes the password reset by consuming a single-use token and setting the new password.voidrequestReset(String email, String resetBaseUrl) Initiates a password reset for the given email address.voidsetElementRegistry(ElementRegistry elementRegistry) voidsetEmailService(EmailService emailService) voidsetEmailTemplateService(EmailTemplateService emailTemplateService) voidsetExpiryHours(String expiryHours) voidsetPasswordPolicyValidator(PasswordPolicyValidator passwordPolicyValidator) voidsetTokenDao(PasswordResetTokenDao tokenDao) voidsetUserDao(UserDao userDao) voidsetUserUidDao(UserUidDao userUidDao)
-
Constructor Details
-
AnonPasswordResetService
public AnonPasswordResetService()
-
-
Method Details
-
requestReset
Description copied from interface:PasswordResetServiceInitiates a password reset for the given email address. Sends a reset email if the email is registered; always returns normally (no user enumeration).- Parameters:
email- the email address of the account to resetresetBaseUrl- the caller-supplied URL prefix; the service appends?token=<token>
-
completeReset
Description copied from interface:PasswordResetServiceCompletes the password reset by consuming a single-use token and setting the new password. All existing sessions are automatically invalidated because the password hash changes.- Parameters:
token- the opaque reset token from the email linknewPassword- the new password to set
-
getUserUidDao
-
setUserUidDao
-
getTokenDao
-
setTokenDao
-
getUserDao
-
setUserDao
-
getEmailService
-
setEmailService
-
getElementRegistry
-
setElementRegistry
-
getEmailTemplateService
-
setEmailTemplateService
@Inject public void setEmailTemplateService(@Named("dev.getelements.elements.service.unscoped") EmailTemplateService emailTemplateService) -
getExpiryHours
-
setExpiryHours
@Inject public void setExpiryHours(@Named("dev.getelements.elements.password_reset.expiry_hours") String expiryHours) -
getPasswordPolicyValidator
-
setPasswordPolicyValidator
-