I am starting work with Apache Shiro. I started with simple examples, and as I leave, complexity.
I am currently collecting email address and password from the login form using JSF and using UsernamePasswordToken to authenticate the user using Shiro.
UsernamePasswordToken token = new UsernamePasswordToken(email, password);
SecurityUtils.getSubject().login(token);
Supported by JDBC core with simple query
jdbcRealm.authenticationQuery = SELECT password FROM user WHERE email = ?
To get more detailed information about the user, for example their name, I look for the user in the database by the director - this is their email address.
currentUser = userDAO.findByEmail((String) SecurityUtils.getSubject().getPrincipal());
, , . - , , . ?