You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by Nolan Darilek <no...@thewordnerd.info> on 2013/08/15 15:56:26 UTC
Many subjects in a single thread
I'd like to use Shiro in [Vert.x](http://vertx.io) and am wondering how
best to code the integration?
Vert.x structures apps in a series of verticles, single-threaded
deployment units that send and receive messages. Basically, what I need
is a piece of code that can authenticate all Shiro sessions in a single
thread and send the caller a token. The caller will fire back JSON
messages like such:
{"auth.isAuthenticated": "TOKEN"} {"auth.isRemembered": "TOKEN"}
and get back some sort of response.
Any pointers as to how to go about doing this? I'm used to using Shiro
in threaded environments where I can run SecurityUtils.getSubject(). Is
it just a matter of mapping tokens to subjects and instantiating them
myself? Are there any gotchas of which I should be aware?