I was wondering if it is possible to have a Java EE application with several JAAS security areas. I am currently developing an application in which some users need to authenticate with data stored in a database, while other users need to authenticate through an LDAP binding.
So, I created 2 security areas in Glassfish 3.1, a JDBC area and an LDAP area and configured my web.xml to use the LDAP area (most users are LDAP).
Then I use:
HttpServletRequest request = (HttpServletRequest) context.getExternalContext().getRequest(); request.login(username, password);
for user authentication
Can I switch to the JDBC scope before calling 'request.login'?
early
source share