Record Class CompromisedPasswordResult.Pwned
java.lang.Object
java.lang.Record
com.svenruppert.jsentinel.credential.compromised.CompromisedPasswordResult.Pwned
- Record Components:
occurrences- number of times the password is known to have appeared in breach data; sources that do not report a count must use1
- All Implemented Interfaces:
CompromisedPasswordResult
- Enclosing interface:
CompromisedPasswordResult
public static record CompromisedPasswordResult.Pwned(long occurrences)
extends Record
implements CompromisedPasswordResult
The candidate password matched a known compromised entry.
-
Nested Class Summary
Nested classes/interfaces inherited from interface CompromisedPasswordResult
CompromisedPasswordResult.CheckFailed, CompromisedPasswordResult.Clean, CompromisedPasswordResult.FailureReason, CompromisedPasswordResult.PwnedModifier and TypeInterfaceDescriptionstatic final recordThe checker could not produce a verdict — network outage, malformed response, timeout, etc.static final recordThe candidate password is not present in the checker's data source.static enumStructured failure reason — never carries password material, URLs or response bodies.static final recordThe candidate password matched a known compromised entry. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of theoccurrencesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Pwned
public Pwned(long occurrences) Creates an instance of aPwnedrecord class.- Parameters:
occurrences- the value for theoccurrencesrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
occurrences
public long occurrences()Returns the value of theoccurrencesrecord component.- Returns:
- the value of the
occurrencesrecord component
-