log in options: log in with user name/password and log in with certificate
how to create custom realm and how to handle multi-realm scenario
account credentials and access rights are stored in database. Stored passwords are hashed and salted.
Authorization
If the realm wishes to do also authorization, it has to implement Authorizer interface. Each Authorizer method takes principal as parameter and checks either role(s) or permission(s)
Permissions are supplied either as strings or as permission objects
use WildcardPermissionResolver to convert strings into permission objects
connect application to database and create tables to store all user account data
replace IniRealm with realm able to read from database and salt passwords.