Class UserEmailVerificationService
java.lang.Object
dev.getelements.elements.service.user.UserEmailVerificationService
- All Implemented Interfaces:
dev.getelements.elements.sdk.service.user.EmailVerificationService
-
Field Summary
Fields inherited from interface dev.getelements.elements.sdk.service.user.EmailVerificationService
EMAIL_VERIFICATION_COMPLETED_EVENT, EMAIL_VERIFICATION_REQUESTED_EVENT, VERIFICATION_BASE_URL, VERIFICATION_EMAIL_SUBJECT, VERIFICATION_EMAIL_TEMPLATE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondev.getelements.elements.sdk.model.user.UserUidcompleteVerification(String token) dev.getelements.elements.sdk.model.user.Userdev.getelements.elements.sdk.ElementRegistrydev.getelements.elements.sdk.service.email.EmailServiceprotected StringReturns the subject line for the verification email.protected StringReturns the HTML body template for the verification email.dev.getelements.elements.sdk.dao.UidVerificationTokenDaodev.getelements.elements.sdk.dao.UserUidDaodev.getelements.elements.sdk.model.user.UserUidrequestVerification(String email, String verificationBaseUrl) voidsetCurrentUser(dev.getelements.elements.sdk.model.user.User currentUser) voidsetElementRegistry(dev.getelements.elements.sdk.ElementRegistry elementRegistry) voidsetEmailService(dev.getelements.elements.sdk.service.email.EmailService emailService) voidsetEmailSubject(String emailSubject) voidsetEmailTemplate(String emailTemplate) voidsetTokenDao(dev.getelements.elements.sdk.dao.UidVerificationTokenDao tokenDao) voidsetUserUidDao(dev.getelements.elements.sdk.dao.UserUidDao userUidDao)
-
Constructor Details
-
UserEmailVerificationService
public UserEmailVerificationService()
-
-
Method Details
-
requestVerification
-
completeVerification
-
getCurrentUser
public dev.getelements.elements.sdk.model.user.User getCurrentUser() -
setCurrentUser
@Inject public void setCurrentUser(dev.getelements.elements.sdk.model.user.User currentUser) -
getUserUidDao
public dev.getelements.elements.sdk.dao.UserUidDao getUserUidDao() -
setUserUidDao
@Inject public void setUserUidDao(dev.getelements.elements.sdk.dao.UserUidDao userUidDao) -
getTokenDao
public dev.getelements.elements.sdk.dao.UidVerificationTokenDao getTokenDao() -
setTokenDao
@Inject public void setTokenDao(dev.getelements.elements.sdk.dao.UidVerificationTokenDao tokenDao) -
getEmailService
public dev.getelements.elements.sdk.service.email.EmailService getEmailService() -
setEmailService
@Inject public void setEmailService(dev.getelements.elements.sdk.service.email.EmailService emailService) -
getElementRegistry
public dev.getelements.elements.sdk.ElementRegistry getElementRegistry() -
setElementRegistry
@Inject public void setElementRegistry(dev.getelements.elements.sdk.ElementRegistry elementRegistry) -
getEmailSubject
Returns the subject line for the verification email.Override this in a subclass to supply a custom subject without reimplementing the full verification flow. The default returns the value injected via
EmailVerificationService.VERIFICATION_EMAIL_SUBJECT. -
setEmailSubject
@Inject public void setEmailSubject(@Named("dev.getelements.elements.verification.email_subject") String emailSubject) -
getEmailTemplate
Returns the HTML body template for the verification email.Override this in a subclass to supply a custom template without reimplementing the full verification flow. The template must contain the literal token
{link}, which is replaced at send-time with the full verification URL. The default returns the value injected viaEmailVerificationService.VERIFICATION_EMAIL_TEMPLATE.To back this with a database (for a live UI editor), inject a DAO here and read from it, falling back to
super.getEmailTemplate()when no override is stored. -
setEmailTemplate
@Inject public void setEmailTemplate(@Named("dev.getelements.elements.verification.email_template") String emailTemplate)
-