archive - contact - sexy exciting merchandise - search - about ← previousFebruary 19th, 2020nextFebruary 19th, 2020: Who was the first person in history with the power to end civilizations? NOT ME, THAT'S FOR (THANKFULLY) SURE– Ryan
Sweet! I have a teeny tiny question regarding SessionScoped/Stateful. Remember when you suggested storing the username and other stuff in a serializable SessionScoped bean that I could inject into a state object in which I could use that information to construct a full state again?
So I have a @Stateful bean called State (ironically) and a @SessionScoped SessionState (containing the serializable information I need so it can be restored from the session). That SessionState is injected into the State object when needed and on PostConstruct of the State the information of the SessionState is used to load the information (like full userdata) into the State. That State is then injected into other places that need it to check user properties.
One of those applications is an AuthorizationFilter that redirects to the Login page if the user isn't logged in yet. Now here is the thing: Once one user has a session, everyone is logged in!
So it feels like the SessionScoped SessionState is shared between all users which it shouldn't be if I understand things correctly?
Am I missing something completely or is this weird?
If I make it @Stateful I get an error on deployment that tells me I cannot use a filter as webcomponent which sounds reasonable but I cannot make it SessionScoped without making it Serializable which I am not sure is so good
Not sure what you mean. Authenticating the user isn't the problem. Storing the information that the user is authenticated is. The idea is that for everything the user could access except for the Login page and ressources required for it, he should get redirected to said login page
@KarelG I think I will use the formbased thingy of that because that is what we want to do. Thanks a bunch! I thought I could get away with a filter like that :D
@Michael For now ^^" There's a new post from SE that me and several others hope leads somewhere. if it doesn't... Well, I'll re-show myself the door :')