Record Class CredentialRehashed
java.lang.Object
java.lang.Record
com.svenruppert.jsentinel.audit.CredentialRehashed
- Record Components:
timestamp- UTC creation timeusername- username whose credential was rehashedfromAlgorithm- algorithm of the previous envelopetoAlgorithm- algorithm of the new envelopereason- dominantRehashReasonthat drove the upgradetargetPolicyVersion- policy version the new envelope targets
- All Implemented Interfaces:
AuditEvent
public record CredentialRehashed(Instant timestamp, String username, String fromAlgorithm, String toAlgorithm, RehashReason reason, int targetPolicyVersion)
extends Record
implements AuditEvent
A successful verification triggered a transparent rehash of the
stored credential. Emitted after the credential store has actually
accepted the new envelope; in-memory demo stores publish this on
every successful rehash too so audit timelines stay consistent.
-
Constructor Summary
ConstructorsConstructorDescriptionCredentialRehashed(Instant timestamp, String username, String fromAlgorithm, String toAlgorithm, RehashReason reason, int targetPolicyVersion) Creates an instance of aCredentialRehashedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefromAlgorithmrecord component.final inthashCode()Returns a hash code value for this object.reason()Returns the value of thereasonrecord component.intReturns the value of thetargetPolicyVersionrecord component.Returns the value of thetimestamprecord component.Returns the value of thetoAlgorithmrecord component.final StringtoString()Returns a string representation of this record class.username()Returns the value of theusernamerecord component.
-
Constructor Details
-
CredentialRehashed
public CredentialRehashed(Instant timestamp, String username, String fromAlgorithm, String toAlgorithm, RehashReason reason, int targetPolicyVersion) Creates an instance of aCredentialRehashedrecord class.- Parameters:
timestamp- the value for thetimestamprecord componentusername- the value for theusernamerecord componentfromAlgorithm- the value for thefromAlgorithmrecord componenttoAlgorithm- the value for thetoAlgorithmrecord componentreason- the value for thereasonrecord componenttargetPolicyVersion- the value for thetargetPolicyVersionrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
timestamp
Returns the value of thetimestamprecord component.- Specified by:
timestampin interfaceAuditEvent- Returns:
- the value of the
timestamprecord component
-
username
-
fromAlgorithm
Returns the value of thefromAlgorithmrecord component.- Returns:
- the value of the
fromAlgorithmrecord component
-
toAlgorithm
Returns the value of thetoAlgorithmrecord component.- Returns:
- the value of the
toAlgorithmrecord component
-
reason
-
targetPolicyVersion
public int targetPolicyVersion()Returns the value of thetargetPolicyVersionrecord component.- Returns:
- the value of the
targetPolicyVersionrecord component
-