public interface EmailTokenVerifier
RegisterNewEmailSender
.Modifier and Type | Interface and Description |
---|---|
static class |
EmailTokenVerifier.InvalidTokenException
Exception thrown when a token does not parse correctly.
|
static class |
EmailTokenVerifier.ParsedToken
Pair returned from decode to provide the data used during encode.
|
Modifier and Type | Method and Description |
---|---|
EmailTokenVerifier.ParsedToken |
decode(java.lang.String tokenString)
Decode a token previously created.
|
java.lang.String |
encode(com.google.gerrit.reviewdb.client.Account.Id accountId,
java.lang.String emailAddress)
Construct a token to verify an email address for a user.
|
java.lang.String encode(com.google.gerrit.reviewdb.client.Account.Id accountId, java.lang.String emailAddress)
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.EmailTokenVerifier.ParsedToken decode(java.lang.String tokenString) throws EmailTokenVerifier.InvalidTokenException
tokenString
- the string created by encode.EmailTokenVerifier.InvalidTokenException
- the token is invalid, expired, malformed, etc.