Record Class SessionStale

java.lang.Object
java.lang.Record
com.svenruppert.jsentinel.audit.SessionStale
Record Components:
timestamp - UTC creation time, never null
subjectId - subject identifier, never blank
sessionId - session identifier, or null if the adapter does not track session ids
route - navigation route / REST path that triggered the check, or null
snapshotVersion - value captured when the session was opened
currentVersion - subject's current security version at check time; must differ from snapshotVersion
All Implemented Interfaces:
AuditEvent

public record SessionStale(Instant timestamp, String subjectId, String sessionId, String route, long snapshotVersion, long currentVersion) extends Record implements AuditEvent
Emitted when a request was refused because the session's security-version snapshot no longer matches the subject's current version. Carries both values so a SIEM can pivot on the delta (admin revoked a role, password changed, …) without parsing free-form reason strings.

Fired by the security-vaadin / security-rest interceptors before the authorization step (Phase 4c of the V00.70 roadmap) and by callers of com.svenruppert.jsentinel.session.JSentinelVersionEnforcer.

  • Constructor Details

    • SessionStale

      public SessionStale(Instant timestamp, String subjectId, String sessionId, String route, long snapshotVersion, long currentVersion)
      Validates the record components.
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • timestamp

      public Instant timestamp()
      Returns the value of the timestamp record component.
      Specified by:
      timestamp in interface AuditEvent
      Returns:
      the value of the timestamp record component
    • subjectId

      public String subjectId()
      Returns the value of the subjectId record component.
      Returns:
      the value of the subjectId record component
    • sessionId

      public String sessionId()
      Returns the value of the sessionId record component.
      Returns:
      the value of the sessionId record component
    • route

      public String route()
      Returns the value of the route record component.
      Returns:
      the value of the route record component
    • snapshotVersion

      public long snapshotVersion()
      Returns the value of the snapshotVersion record component.
      Returns:
      the value of the snapshotVersion record component
    • currentVersion

      public long currentVersion()
      Returns the value of the currentVersion record component.
      Returns:
      the value of the currentVersion record component