Custom Authentication handler where user creds are stored in Cassandra db.
-
Created package org.apereo.cas..adaptors.cassandra
-
CassandraAuthenticationHandler
public class CassandraAuthenticationHandler implements AuthenticationHandler {
}
-
Created org.apereo.cas..adaptors.cassandra.config.CasCassandraConfiguration similar to org.apereo.cas.adaptors.generic.config.CasGenericConfiguration.
@Configuration("casCassandraConfiguration") @EnableConfigurationProperties(CasConfigurationProperties.class) public class CasCassandraConfiguration {
@RefreshScope @Bean public AuthenticationHandler cassandraAuthenticationHandler() { final CassandraAuthenticationHandler h = new CassandraAuthenticationHandler(); return h; } @PostConstruct public void initializeAuthenticationHandler() { System.out.println("1755"); this.authenticationHandlersResolvers.put(cassandraAuthenticationHandler(), personDirectoryPrincipalResolver); }