@Override public Consumer<Runnable> getSecurityContextAssociator(){ SecurityDomain elytronDomain = getCurrentSecurityDomain(); if(elytronDomain != null) { // store the identity from the original thread and use it in callback which will be invoked in a different thread SecurityIdentity storedSecurityIdentity = elytronDomain.getCurrentSecurityIdentity(); return (action) -> storedSecurityIdentity.runAs(action); } else { return SecurityServices.super.getSecurityContextAssociator(); } }
final Consumer<Runnable> securityContextActionConsumer = securityServices.getSecurityContextAssociator(); final ObserverExceptionHandler exceptionHandler; CompletableFuture<U> completableFuture;
final Consumer<Runnable> securityContextActionConsumer = securityServices.getSecurityContextAssociator(); final ObserverExceptionHandler exceptionHandler; CompletableFuture<U> completableFuture;
final Consumer<Runnable> securityContextActionConsumer = securityServices.getSecurityContextAssociator(); final ObserverExceptionHandler exceptionHandler; CompletableFuture<U> completableFuture;
final Consumer<Runnable> securityContextActionConsumer = securityServices.getSecurityContextAssociator(); final ObserverExceptionHandler exceptionHandler; CompletableFuture<U> completableFuture;
final Consumer<Runnable> securityContextActionConsumer = securityServices.getSecurityContextAssociator(); final ObserverExceptionHandler exceptionHandler; CompletableFuture<U> completableFuture;