Interface RecoveryCodeRepository
- All Known Implementing Classes:
InMemoryRecoveryCodeRepository, JdbcRecoveryCodeRepository
public interface RecoveryCodeRepository
Where recovery codes are kept: as hashes, never as the codes.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanUses one code up.intHow many codesusernamehas left.findHashes(String username) A snapshot of the user's salted password hashes, for checking a presented code.voidReplaces every code ofusernamewith these hashes.
-
Method Details
-
replace
-
findHashes
A snapshot of the user's salted password hashes, for checking a presented code. An unknown user has an empty list. Consumption still goes throughconsume(String, String). -
consume
-
count
How many codesusernamehas left.
-