Runnablewith logic for setting up a
SecurityContextbefore invoking the delegate
Runnableand then removing the
SecurityContextafter the delegate has completed.
|Constructor and Description|
|Modifier and Type||Method and Description|
Factory method for creating a
public DelegatingSecurityContextRunnable(Runnable delegate, SecurityContext securityContext)
public DelegatingSecurityContextRunnable(Runnable delegate)
public static Runnable create(Runnable delegate, SecurityContext securityContext)
delegate- the original
Runnablethat will be delegated to after establishing a
SecurityContextHolder. Cannot have null.
SecurityContextto establish before invoking the delegate
Runnable. If null, the current
SecurityContextHolderwill be used.