sounds familiar (already answered i guess) make a redirection after the login
- Romain 2012/7/6 Thiago Veronezi <[email protected]> > Hi guys! > > I am trying to handle the user "login" in a programmatic way. > > The command bellow is called by a Servlet... > > ************************************* > public class Login implements Command { > > @Override > public Object execute(Params params) throws Exception { > final String user = params.getString("userName"); > final String password = params.getString("userPassword"); > params.getReq().login(user, password); > return null; > } > } > ************************************* > > This is fine. I manage to login. The problem is that at the EJB side the > Principal is still the "guest" user. See the EJB code below... > > ************************************* > @Override > public Map<String, Object> getSystemStatus() { > final Map<String, Object> result = new HashMap<String, Object>(); > > result.put("isAdmin", this.context.isCallerInRole("admin")); > result.put("isUser", this.context.isCallerInRole("user")); > result.put("userName", > this.context.getCallerPrincipal().getName()); > result.put("currentDraw", getCurrentDraw()); > > return result; > } > ************************************* > > I have a feeling that Tomee does not manage manual logins like the one > above. Can you guys give me a hint of where should I find this integration > code? > > []s, > > Thiago. >
