You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by dominicp <do...@hotmail.com> on 2013/05/31 14:31:30 UTC
Shiro for EJB jar with Swing Client
Hi there,
I have an EJB jar deployed on a glassfish server offering some stateless EJB
services and a Swing client that uses these services. The Swing client
should have a simple login dialog for authentication. For that I want to use
Shiro. Unfortunately, I only found documentation for securing web-apps but
not for securing EJB jars.
I would be glad if you could answer me the following two questions:
1. Do I have to call SecurityUtils.getSubject().login(token) on client or
server side?
2. For web apps there is the ShiroFilter for securing the requests, is there
a similar concept for EJB jars?
Thanks for your time,
Dominic
--
View this message in context: http://shiro-user.582556.n2.nabble.com/Shiro-for-EJB-jar-with-Swing-Client-tp7578790.html
Sent from the Shiro User mailing list archive at Nabble.com.
Re: Shiro for EJB jar with Swing Client
Posted by dominicp <do...@hotmail.com>.
OK I think i got it. The idea is to create an interceptor which creates a
Subject before each EJB call and binds it to the current thread. Basically
doing what ShiroFilter does for web apps.
The only problem now is the creation of the subject. To do so, we need the
session key/id to get the session of the current user. But I don't want to
pass the sessionID as argument in every EJB method. Is there a good solution
to get the session id?
--
View this message in context: http://shiro-user.582556.n2.nabble.com/Shiro-for-EJB-jar-with-Swing-Client-tp7578790p7578791.html
Sent from the Shiro User mailing list archive at Nabble.com.