Interface TokenService
-
- All Known Implementing Classes:
TokenServiceImpl
public interface TokenService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
createPasswordResetTokenForUser(User user, java.lang.String token)
This method creates a verification toke for database entity(user).void
createVerificationTokenForUser(User user, java.lang.String token)
This method creates a verification toke for database entity(user).void
deletePasswordResetToken(PasswordResetToken passwordResetToken)
This method removed a database entity.void
deleteVerificationToken(VerificationToken verificationToken)
This method removed a database entity.java.util.Optional<PasswordResetToken>
findByUser(User user)
This method returns a database entity.java.util.Optional<PasswordResetToken>
getPasswordResetToken(java.lang.String passwordResetToken)
This method returns a database entity.java.util.Optional<VerificationToken>
getVerificationToken(java.lang.String verificationToken)
This method returns a database entity.
-
-
-
Method Detail
-
createVerificationTokenForUser
void createVerificationTokenForUser(User user, java.lang.String token)
This method creates a verification toke for database entity(user).- Parameters:
user
- database entitytoken
- field value, which will be added in database entity
-
createPasswordResetTokenForUser
void createPasswordResetTokenForUser(User user, java.lang.String token)
This method creates a verification toke for database entity(user).- Parameters:
user
- database entitytoken
- field value, which will be added in database entity
-
getVerificationToken
java.util.Optional<VerificationToken> getVerificationToken(java.lang.String verificationToken)
This method returns a database entity.- Parameters:
verificationToken
- database entity- Returns:
- optional value to externally interaction
-
getPasswordResetToken
java.util.Optional<PasswordResetToken> getPasswordResetToken(java.lang.String passwordResetToken)
This method returns a database entity.- Parameters:
passwordResetToken
- database entity- Returns:
- optional value to externally interaction
-
findByUser
java.util.Optional<PasswordResetToken> findByUser(User user)
This method returns a database entity.- Parameters:
user
- database entity for find and return other database entity- Returns:
- optional value to externally interaction
-
deleteVerificationToken
void deleteVerificationToken(VerificationToken verificationToken)
This method removed a database entity.- Parameters:
verificationToken
- database entity, which will be removed
-
deletePasswordResetToken
void deletePasswordResetToken(PasswordResetToken passwordResetToken)
This method removed a database entity.- Parameters:
passwordResetToken
- database entity, which will be removed
-
-