Interface SecurityServices

    • Method Detail

      • getPrincipal

        Principal getPrincipal()
        Obtain the Principal representing the current caller identity
        Returns:
        the Principal representing the current caller identity
      • getSecurityContext

        default SecurityContext getSecurityContext()
        Obtain the security context associated with the current thread. This method is used by Weld to propagate the security context of the current thread to different threads.

        By default, a noop fallback implementation is returned.

        Returns:
        the security context associated with the current thread
        Since:
        3.0
      • getSecurityContextAssociator

        default Consumer<Runnable> getSecurityContextAssociator()
        Obtain the security context associated with the current thread and associate this context when an action is performed. This method is used by Weld to propagate the security context of the current thread to different threads.

        By default, the consumer is using getSecurityContext() to associate the security context.

        Returns:
        a consumer that accepts an action to be performed with the security context associated with the current thread