Search before asking
Question
Hello,
with the change from #2082 we are no longer able to run our multi-threading model as before so that we could not adopt Shiro 2.0.4 or higher.
Essentially our coding relies so far on the fact that we can obtain the principal using
SecurityUtils.getSubject().getPrincipal()
also in child threads launched from a parent thread (typically an HTTP request).
I tried following guidance from https://shiro.apache.org/subject.html#Subject-ThreadAssociation but without success. Even when associating the subject with the Runnable, I am receiving null for the principal now which used to work prior to 2.0.4.
Is there any guidance / workaround how the user context can be made available to child threads?
Regards, Eric