public class SignedTokenEmailTokenVerifier extends java.lang.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(java.lang.String tokenString)
Decode a token previously created.
|
java.lang.String |
encode(Account.Id accountId,
java.lang.String emailAddress)
Construct a token to verify an email address for a user.
|
public java.lang.String encode(Account.Id accountId, java.lang.String emailAddress)
EmailTokenVerifier
encode
in interface EmailTokenVerifier
accountId
- 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(java.lang.String tokenString) throws EmailTokenVerifier.InvalidTokenException
EmailTokenVerifier
decode
in interface EmailTokenVerifier
tokenString
- the string created by encode. Never null.EmailTokenVerifier.InvalidTokenException
- the token is invalid, expired, malformed, etc.