Interface VerificationService

  • All Known Implementing Classes:
    VerificationServiceImpl

    public interface VerificationService
    Service used to verify a particular activity with the profile owner (like a recently created profile or a reset password request).
    Author:
    avasquez
    • Method Detail

      • createToken

        VerificationToken createToken​(Profile profile)
                               throws ProfileException
        Creates a new verification token. The token can be later transmitted to the client through email, for example.
        Parameters:
        profile - the profile to create the token for
        Throws:
        ProfileException
      • sendEmail

        void sendEmail​(VerificationToken token,
                       Profile profile,
                       String verificationUrl,
                       String from,
                       String subject,
                       String templateName)
                throws ProfileException
        Creates a verification token and sends the user an email with the token for verification.
        Parameters:
        token - the verification token to send
        profile - the profile of the user
        verificationUrl - the URL the user should click to verify the new profile
        from - the from address
        subject - the subject of the email
        templateName - the template name of the email
        Throws:
        ProfileException
      • getToken

        VerificationToken getToken​(String tokenId)
                            throws ProfileException
        Returns the token that corresponds to the specified ID
        Parameters:
        tokenId - the token ID, sent in the verification email
        Returns:
        the verification token object associated to the ID
        Throws:
        ProfileException
      • deleteToken

        void deleteToken​(String tokenId)
                  throws ProfileException
        Deletes the token corresponding the specified ID.
        Parameters:
        tokenId - the ID of the token to delete
        Throws:
        ProfileException