What should be stored in UserContext?
Posted
by
HonorGod
on Programmers
See other posts from Programmers
or by HonorGod
Published on 2012-12-05T15:41:09Z
Indexed on
2012/12/05
17:25 UTC
Read the original article
Hit count: 149
From my general understanding I believe UserContext for a web application is supposed to hold user authentication and authorization (user roles) information.
As part of user roles, there are definitions on who can access what data and accordingly the corresponding reference data is loaded into the UserContext as well.
Is this a good practice to load and use reference data from UserContext? Does this have any impact with the number of sessions vs size of data it is holding inside JVM?
I am thinking we use UserContext only for authentication and authorization but load the reference data from cache on demand and use it if required.
© Programmers or respective owner