Refresh Glassfish realm to update user roles
I use the security annotations in GlassFish (@RolesAllowed, ...) in combination with a custom realm (based on AppservRealm). When the user logs in the realm returns the assigned user roles via getGroupNames(). Now we've a situation that the roles of the currently logged in user changes (e.g. the user does not longer has the role ADMIN).
Is there a way to trigger a reload of the realm data by GlassFish so e.g. the getGroupNames() 开发者_开发百科will be called by GlassFish an returned the new roles of the currently logged in user?
精彩评论