Interface PasswordTokenValidator<P extends PasswordToken>
-
- All Known Implementing Classes:
DefaultPasswordTokenValidator
public interface PasswordTokenValidator<P extends PasswordToken>
This validator performs various checks on the validity of a password token compared to that of a set of password tokens that belong to a user.- Author:
- Nathan Moore (nathanmoore).
- See Also:
PasswordToken.getUserId()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
exists(String token, Collection<P> passwordTokens)
boolean
isExpired(String token, Collection<P> passwordTokens)
boolean
isUsed(String token, Collection<P> passwordTokens)
boolean
isValid(String token, Collection<P> passwordTokens)
Performs all checks
-
-
-
Method Detail
-
exists
boolean exists(String token, Collection<P> passwordTokens)
-
isUsed
boolean isUsed(String token, Collection<P> passwordTokens)
-
isExpired
boolean isExpired(String token, Collection<P> passwordTokens)
-
isValid
boolean isValid(String token, Collection<P> passwordTokens)
Performs all checks- Parameters:
token
- the token to validatepasswordTokens
- A set of tokens belonging to a user- Returns:
- if the given token is valid for the given user
-
-