I want to get my current loggin User in my EJB Container. I built an CDI - EJB Webapplication with Shiro for Security.
My problem is now, in my EJB Class the sessionContext is everytime "anonymous"
@Resource
private SessionContext sessionContext;
String userEmail = sessionContext.getCallerPrincipal().getName();
I don´t know, set Shiro this automaticly or should I set sessionContext? Can anybody help me?
The problem is the connection from CDI ---> EJB or why is it "anonymous"