Package org.craftercms.profile.services
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 Summary
Modifier and TypeMethodDescriptioncreateToken
(Profile profile) Creates a new verification token.void
deleteToken
(String tokenId) Deletes the token corresponding the specified ID.Returns the token that corresponds to the specified IDvoid
sendEmail
(VerificationToken token, Profile profile, String verificationUrl, String from, String subject, String templateName) Creates a verification token and sends the user an email with the token for verification.
-
Method Details
-
createToken
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 sendprofile
- the profile of the userverificationUrl
- the URL the user should click to verify the new profilefrom
- the from addresssubject
- the subject of the emailtemplateName
- the template name of the email- Throws:
ProfileException
-
getToken
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
Deletes the token corresponding the specified ID.- Parameters:
tokenId
- the ID of the token to delete- Throws:
ProfileException
-