I am using CAS with JDBC Authentication handler and was wondering is it possible to get the other attributes of principal object (for e.g. firstname, lastname) not just the
To get any user attributes from DB I did the following:
use PersonDirectoryPrincipalResolver
in deployerConfigContext.xml:
instead of using standard SingleRowJdbcPersonAttributeDao class create your own implementation which returns not only one row from a query result but aggregated data from all returned rows:
copy all code from SingleRowJdbcPersonAttributeDao and change only one method parseAttributeMapFromResults.
you will have something like that:
public class SingleRowJdbcPersonMultiplyAttributeDao extends AbstractJdbcPersonAttributeDao
and in deployerConfigContext.xml:
Also in my case I used SAML protocol.
As a result you will get on the client all attributes which your select returns.
For example, if user have many roles you could have on the client: