Class UiApiInProcessSessions

java.lang.Object
com.kingsrook.qqq.middleware.javalin.specs.invoke.UiApiInProcessSessions

public final class UiApiInProcessSessions extends Object
JVM-local, in-memory session tokens accepted only from loopback requests. For components that authenticate users by other means, then mint sessions via QAuthenticationModuleInterface.createAutomatedSessionForUser. Registration and resolution copy the session so per-request mutations cannot affect other calls.
  • Field Details

  • Method Details

    • register

      public static String register(QSession session, Duration ttl)
      Register a snapshot for a positive lifetime of at most 24 hours.
    • resolve

      public static Optional<QSession> resolve(String token)
      Resolve an unexpired token to a fresh request-local session copy.
    • revoke

      public static void revoke(String token)
      Revoke a token; unknown tokens are harmless.
    • size

      public static int size()
      Number of stored tokens, including entries not yet purged after expiry.