Class SecurityContexts

java.lang.Object
org.j7m.middleware.security.api.SecurityContexts

public final class SecurityContexts extends Object
Thread-local security context holder used by runtime and proxy code.
  • Method Details

    • current

      public static SecurityContext current()
      Returns the current security context.
      Returns:
      context or null
    • call

      public static <T> T call(SecurityContext context, Callable<T> body)
      Runs a body with a security context.
      Type Parameters:
      T - return type
      Parameters:
      context - context to install
      body - body to execute
      Returns:
      body result
    • run

      public static void run(SecurityContext context, Runnable body)
      Runs a body with a security context.
      Parameters:
      context - context to install
      body - body to execute