Package org.jboss.weld.security.spi
Interface SecurityServices
- All Superinterfaces:
Service
Responsible for accessing security related functionality the environment can provide.
Required in a Java EE environment. SecurityServices is a per-deployment service.
An integrator should either implement getSecurityContext() or getSecurityContextAssociator(). By default,
the
getSecurityContextAssociator() method delegates to getSecurityContext(). The container always calls the
getSecurityContextAssociator() method.
- Author:
- pmuir, Jozef Hartinger
-
Method Summary
Modifier and TypeMethodDescriptionObtain the Principal representing the current caller identitydefault SecurityContextObtain the security context associated with the current thread.Obtain the security context associated with the current thread and associate this context when an action is performed.
-
Method Details
-
getPrincipal
Principal getPrincipal()Obtain the Principal representing the current caller identity- Returns:
- the Principal representing the current caller identity
-
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
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
-