GitHub user lprimak added a comment to the discussion: [Question] how to ensure
child threads have same subject as parent thread
Hi,
You are on the right track.
In your child threads, you need to use something like the following:
```
try {
ThreadContext.bind(securityManager)
// rest of your code
} finally {
ThreadContext.remove();
}
```
you may also do ThreadContext.bind(Subject) but that should already be taken
care of as documented in
https://shiro.apache.org/subject.html#Subject-ThreadAssociation
Hope this helps.
GitHub link:
https://github.com/apache/shiro/discussions/2413#discussioncomment-15168139
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]