Class TokenServiceImpl

  • All Implemented Interfaces:
    TokenService

    @Service
    public class TokenServiceImpl
    extends java.lang.Object
    implements TokenService
    • Constructor Detail

      • TokenServiceImpl

        public TokenServiceImpl()
    • Method Detail

      • createVerificationTokenForUser

        @Transactional
        public void createVerificationTokenForUser​(User user,
                                                   java.lang.String token)
        Description copied from interface: TokenService
        This method creates a verification toke for database entity(user).
        Specified by:
        createVerificationTokenForUser in interface TokenService
        Parameters:
        user - database entity
        token - field value, which will be added in database entity
      • createPasswordResetTokenForUser

        @Transactional
        public void createPasswordResetTokenForUser​(User user,
                                                    java.lang.String token)
        Description copied from interface: TokenService
        This method creates a verification toke for database entity(user).
        Specified by:
        createPasswordResetTokenForUser in interface TokenService
        Parameters:
        user - database entity
        token - field value, which will be added in database entity
      • getVerificationToken

        @Transactional
        public java.util.Optional<VerificationToken> getVerificationToken​(java.lang.String VerificationToken)
        Description copied from interface: TokenService
        This method returns a database entity.
        Specified by:
        getVerificationToken in interface TokenService
        Parameters:
        VerificationToken - database entity
        Returns:
        optional value to externally interaction
      • getPasswordResetToken

        @Transactional
        public java.util.Optional<PasswordResetToken> getPasswordResetToken​(java.lang.String passwordResetToken)
        Description copied from interface: TokenService
        This method returns a database entity.
        Specified by:
        getPasswordResetToken in interface TokenService
        Parameters:
        passwordResetToken - database entity
        Returns:
        optional value to externally interaction
      • findByUser

        @Transactional
        public java.util.Optional<PasswordResetToken> findByUser​(User user)
        Description copied from interface: TokenService
        This method returns a database entity.
        Specified by:
        findByUser in interface TokenService
        Parameters:
        user - database entity for find and return other database entity
        Returns:
        optional value to externally interaction
      • deleteVerificationToken

        @Transactional
        public void deleteVerificationToken​(VerificationToken verificationToken)
        Description copied from interface: TokenService
        This method removed a database entity.
        Specified by:
        deleteVerificationToken in interface TokenService
        Parameters:
        verificationToken - database entity, which will be removed
      • deletePasswordResetToken

        @Transactional
        public void deletePasswordResetToken​(PasswordResetToken passwordResetToken)
        Description copied from interface: TokenService
        This method removed a database entity.
        Specified by:
        deletePasswordResetToken in interface TokenService
        Parameters:
        passwordResetToken - database entity, which will be removed