@Service(value="passwordResetTokenService") public class PasswordResetTokenService<E extends PasswordResetToken,D extends PasswordResetTokenDao<E>> extends AbstractUserTokenService<E,D>
permissionCollectionServicedao, logger| Modifier | Constructor and Description |
|---|---|
|
PasswordResetTokenService()
Default constructor, which calls the type-constructor
|
protected |
PasswordResetTokenService(Class<E> entityClass)
Constructor that sets the concrete entity class for the service.
|
| Modifier and Type | Method and Description |
|---|---|
protected E |
buildConcreteInstance(User user,
Integer expirationTimeInMinutes)
Builds a concrete instance of this class.
|
String |
getChangePasswordPath() |
MailPublisher |
getMailPublisher() |
org.springframework.security.crypto.password.PasswordEncoder |
getPasswordEncoder() |
org.springframework.mail.SimpleMailMessage |
getResetPasswordMailMessageTemplate() |
void |
sendResetPasswordMail(javax.servlet.http.HttpServletRequest request,
String email) |
void |
setChangePasswordPath(String changePasswordPath) |
void |
setDao(D dao)
We have to use
Qualifier to define the correct dao here. |
void |
setMailPublisher(MailPublisher mailPublisher) |
void |
setPasswordEncoder(org.springframework.security.crypto.password.PasswordEncoder passwordEncoder) |
void |
setResetPasswordMailMessageTemplate(org.springframework.mail.SimpleMailMessage resetPasswordMailMessageTemplate) |
void |
validateTokenAndUpdatePassword(String rawPassword,
String token) |
findByUser, getValidTokenForUser, validateTokenfindByTokenValueaddAndSaveGroupPermissions, addAndSaveUserPermissions, findAllUserGroupPermissionsOfUserGroup, findAllUserPermissionsOfUser, getPermissionCollectionService, removeAndSaveGroupPermissions, removeAndSaveUserPermissions, setPermissionCollectionServicedelete, findAll, findAllRestricted, findAllWhereFieldEquals, findAllWithCollectionContaining, findById, findBySimpleFilter, loadById, saveOrUpdate, updatePartialWithJsonNodegetDao, getEntityClasspublic PasswordResetTokenService()
@Autowired @Qualifier(value="passwordResetTokenDao") public void setDao(D dao)
Qualifier to define the correct dao here.
Otherwise, spring can not decide which dao has to be autowired here
as there are multiple candidates.setDao in class PermissionAwareCrudService<E extends PasswordResetToken,D extends PasswordResetTokenDao<E>>dao - the dao to setprotected E buildConcreteInstance(User user, Integer expirationTimeInMinutes)
buildConcreteInstance in class AbstractUserTokenService<E extends PasswordResetToken,D extends PasswordResetTokenDao<E>>public void sendResetPasswordMail(javax.servlet.http.HttpServletRequest request,
String email)
throws NoSuchMethodException,
SecurityException,
InstantiationException,
IllegalAccessException,
IllegalArgumentException,
InvocationTargetException,
URISyntaxException,
UnsupportedEncodingException
request - email - InvocationTargetExceptionIllegalArgumentExceptionIllegalAccessExceptionInstantiationExceptionSecurityExceptionNoSuchMethodExceptionURISyntaxExceptionUnsupportedEncodingExceptionpublic void validateTokenAndUpdatePassword(String rawPassword, String token) throws Exception
rawPassword - token - Exceptionpublic MailPublisher getMailPublisher()
public void setMailPublisher(MailPublisher mailPublisher)
mailPublisher - the mailPublisher to setpublic org.springframework.security.crypto.password.PasswordEncoder getPasswordEncoder()
public void setPasswordEncoder(org.springframework.security.crypto.password.PasswordEncoder passwordEncoder)
passwordEncoder - the passwordEncoder to setpublic org.springframework.mail.SimpleMailMessage getResetPasswordMailMessageTemplate()
public void setResetPasswordMailMessageTemplate(org.springframework.mail.SimpleMailMessage resetPasswordMailMessageTemplate)
resetPasswordMailMessageTemplate - the resetPasswordMailMessageTemplate to setpublic String getChangePasswordPath()
public void setChangePasswordPath(String changePasswordPath)
changePasswordPath - the changePasswordPath to setCopyright © 2020 terrestris GmbH & Co. KG. All rights reserved.