Record Class RestJSentinelVersionContext
java.lang.Object
java.lang.Record
com.svenruppert.jsentinel.rest.RestJSentinelVersionContext
- Record Components:
subjectId- authenticated subject; non-nulltenant- tenant scope;nullbecomesTenantId.DEFAULTsnapshot- security version captured when the session / token was issued; non-nullsessionId- opaque session identifier (token, session id, …) for audit correlation; may benull
@ExperimentalJSentinelApi
public record RestJSentinelVersionContext(com.svenruppert.jsentinel.logout.SubjectId subjectId, com.svenruppert.jsentinel.authorization.api.tenant.TenantId tenant, com.svenruppert.jsentinel.session.JSentinelVersion snapshot, String sessionId)
extends Record
Per-request session security context surfaced by a
RestSubjectResolver so RestJSentinelVersionFilter
can run a drift check before authorization.
Implementations of RestSubjectResolver that want their
deployment to participate in Phase 4c drift detection override
RestSubjectResolver.resolveJSentinelVersionContext(RestRequest)
and return a populated record. Implementations that don't (e.g.
stateless API-key flows where every request rehydrates the
subject) keep the default Optional.empty() and the
filter is a no-op for them.
-
Constructor Summary
ConstructorsConstructorDescriptionRestJSentinelVersionContext(com.svenruppert.jsentinel.logout.SubjectId subjectId, com.svenruppert.jsentinel.authorization.api.tenant.TenantId tenant, com.svenruppert.jsentinel.session.JSentinelVersion snapshot, String sessionId) Validates the components and normalisesnulltenant. -
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.Returns the value of thesessionIdrecord component.com.svenruppert.jsentinel.session.JSentinelVersionsnapshot()Returns the value of thesnapshotrecord component.com.svenruppert.jsentinel.logout.SubjectIdReturns the value of thesubjectIdrecord component.com.svenruppert.jsentinel.authorization.api.tenant.TenantIdtenant()Returns the value of thetenantrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RestJSentinelVersionContext
public RestJSentinelVersionContext(com.svenruppert.jsentinel.logout.SubjectId subjectId, com.svenruppert.jsentinel.authorization.api.tenant.TenantId tenant, com.svenruppert.jsentinel.session.JSentinelVersion snapshot, String sessionId) Validates the components and normalisesnulltenant.
-
-
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). -
subjectId
-
tenant
-
snapshot
-
sessionId
-