public class SignedTokenEmailTokenVerifier extends Object implements EmailTokenVerifier
RegisterNewEmailSender.| Modifier and Type | Class and Description |
|---|---|
static class |
SignedTokenEmailTokenVerifier.Module |
EmailTokenVerifier.InvalidTokenException, EmailTokenVerifier.ParsedToken| Modifier and Type | Method and Description |
|---|---|
EmailTokenVerifier.ParsedToken |
decode(String tokenString)
Decode a token previously created.
|
String |
encode(Account.Id accountId,
String emailAddress)
Construct a token to verify an email address for a user.
|
public String encode(Account.Id accountId, String emailAddress)
EmailTokenVerifierencode in interface EmailTokenVerifieraccountId - the caller that wants to add an email to their account.emailAddress - the address to add.emailAddress. Presenting the string provides
proof the user has the ability to read messages sent to that address. Must not be null.public EmailTokenVerifier.ParsedToken decode(String tokenString) throws EmailTokenVerifier.InvalidTokenException
EmailTokenVerifierdecode in interface EmailTokenVerifiertokenString - the string created by encode. Never null.EmailTokenVerifier.InvalidTokenException - the token is invalid, expired, malformed, etc.