Interface SessionDecision
- All Known Implementing Classes:
SessionDecision.Continue, SessionDecision.Invalidate, SessionDecision.RequireLogin
public sealed interface SessionDecision
permits SessionDecision.Continue, SessionDecision.RequireLogin, SessionDecision.Invalidate
Outcome of a
SessionPolicy.beforeNavigation(SessionContext)
decision.
Adapters interpret the result:
SessionDecision.Continue— let the navigation proceed.SessionDecision.RequireLogin— drop the subject (if any) and forward tologinRoute. Used for "your session has expired — sign in again" situations.SessionDecision.Invalidate— drop the subject, invalidate the session (HTTP / Vaadin), and forward tologinRoute. Used when the policy actively wants to destroy the session, not just force re-authentication.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordThe navigation may proceed unchanged.static final recordThe session must be invalidated.static final recordThe subject must re-authenticate. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic SessionDecision.Continuecont()Returns the sharedSessionDecision.Continuesingleton.
-
Method Details
-
cont
Returns the sharedSessionDecision.Continuesingleton. Convenience for the common case inSessionPolicyimplementations.- Returns:
- the singleton continue decision
-