Class DefaultDummyVerificationService
java.lang.Object
com.svenruppert.jsentinel.credential.password.dummy.DefaultDummyVerificationService
- All Implemented Interfaces:
DummyVerificationService
public final class DefaultDummyVerificationService
extends Object
implements DummyVerificationService
Reference
DummyVerificationService.
Caches a single envelope built under the active policy at construction time (against a fixed, well-known "dummy" password) and verifies the supplied candidate against that envelope on every call.
If the policy's preferred provider is somehow unavailable at call time, the service falls back to whichever provider is registered for the preferred algorithm, then to the first registered provider. The dummy path therefore always performs some KDF work, never short-circuits, and never throws.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultDummyVerificationService(PasswordHashProviderRegistry providerRegistry, PasswordHashPolicy policy, PasswordHashCodec codec) -
Method Summary
Modifier and TypeMethodDescriptionvoidrunDummyKdf(char[] password, DummyVerificationContext context) Executes a single dummy KDF against a stored dummy envelope built under the active policy.
-
Constructor Details
-
DefaultDummyVerificationService
public DefaultDummyVerificationService(PasswordHashProviderRegistry providerRegistry, PasswordHashPolicy policy, PasswordHashCodec codec)
-
-
Method Details
-
runDummyKdf
Description copied from interface:DummyVerificationServiceExecutes a single dummy KDF against a stored dummy envelope built under the active policy. Returns nothing meaningful; the caller already knows the verification failed.Implementations must not throw on missing providers — they must fall back to the policy's default dummy provider so the dummy path remains uniform across failure types.
- Specified by:
runDummyKdfin interfaceDummyVerificationService
-