Class PasswordHistoryService

java.lang.Object
com.svenruppert.jsentinel.credential.history.PasswordHistoryService

public final class PasswordHistoryService extends Object
Coordinates the optional password-history check.

Adapters call evaluate(String, SecretValue, PasswordHistoryPolicy) with the candidate password before persisting the new hash. If the policy is disabled the service returns PasswordHistoryDecision.Allowed without touching the store. If enabled it verifies the candidate against each retained verifier through the same PasswordHashingService used for the normal login path — old envelopes therefore remain readable as long as their algorithm is still registered (CWE-693).

After a successful change adapters call recordNew(String, String, Instant, PasswordHistoryPolicy) with the freshly produced envelope and the active retention setting. The store enforces the cap via PasswordHistoryStore.appendAndTrim(String, PasswordHistoryEntry, int) (CWE-400).