Record Class CredentialStatusChanged
java.lang.Object
java.lang.Record
com.svenruppert.jsentinel.audit.CredentialStatusChanged
- Record Components:
timestamp- UTC creation timeusername- credential identifierfromStatus- previous statustoStatus- new statusreason- short structural reason key (e.g."force-change","compromised","rehash-completed"), ornull
- All Implemented Interfaces:
AuditEvent
public record CredentialStatusChanged(Instant timestamp, String username, CredentialStatus fromStatus, CredentialStatus toStatus, String reason)
extends Record
implements AuditEvent
Credential lifecycle status transitioned from
fromStatus to
toStatus.
Carries only the structural state names; no password material or envelope content (CWE-209 / CWE-522).
-
Constructor Summary
ConstructorsConstructorDescriptionCredentialStatusChanged(Instant timestamp, String username, CredentialStatus fromStatus, CredentialStatus toStatus, String reason) Creates an instance of aCredentialStatusChangedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefromStatusrecord component.final inthashCode()Returns a hash code value for this object.reason()Returns the value of thereasonrecord component.Returns the value of thetimestamprecord component.toStatus()Returns the value of thetoStatusrecord component.final StringtoString()Returns a string representation of this record class.username()Returns the value of theusernamerecord component.
-
Constructor Details
-
CredentialStatusChanged
public CredentialStatusChanged(Instant timestamp, String username, CredentialStatus fromStatus, CredentialStatus toStatus, String reason) Creates an instance of aCredentialStatusChangedrecord class.- Parameters:
timestamp- the value for thetimestamprecord componentusername- the value for theusernamerecord componentfromStatus- the value for thefromStatusrecord componenttoStatus- the value for thetoStatusrecord componentreason- the value for thereasonrecord 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 withObjects::equals(Object,Object). -
timestamp
Returns the value of thetimestamprecord component.- Specified by:
timestampin interfaceAuditEvent- Returns:
- the value of the
timestamprecord component
-
username
-
fromStatus
Returns the value of thefromStatusrecord component.- Returns:
- the value of the
fromStatusrecord component
-
toStatus
-
reason
-