This authentication manager ensures that all authentication handlers are tried, but if one is tried and is successful, the associated CredentialsToPrincipalResolver is used.
Note: You may also specify and link different attribute repository stored for each resolver. CAS still expects an attributeRepository spring bean to be defined. (See cas-servlet.xml for more info) So if you wish to specify multiple repositories for each resolver, you should consider using the Person Directory API to merge all attribute stores into one.
The configuration below passes a constructed map to the authentication manager. This map specifies how authentication handlers and resolvers are linked to each other.
The configuration of the map itself is given below:
The above configuration uses two flavors of the ldap authentication handler allong with an instance of the HttpBased authentication handler. Each of the ldap authentication handlers are linked to their own repository store for attribute retrieval. (bindLdapAttributeRepository, fastBindLdapAttributeRepository). To learn how each attribute repository may be configured, please visit this page.
Merging Attribute Repository
Once all attribute repositories are configured, they may be merged together to form the global attributeRepository bean through the sample configuration below: