@Override
    public void handleCasAuthenticationTransactionFailureEvent(final CasAuthenticationTransactionFailureEvent event) throws Throwable {
        val dto = prepareCasEvent(event);
        dto.setPrincipalId(event.getCredential().getId());
        dto.putEventId(CasAuthenticationTransactionFailureEvent.class.getSimpleName());
        this.casEventRepository.save(dto);
    }
This is {@link CasAuthenticationAuthenticationEventListener} that attempts to consume CAS events
upon various authentication events. Event data is persisted into a repository
via {@link CasEventRepository}.

@author Misagh Moayyed
@since 5.0.0
core/cas-server-core-events-api/src/main/java/org/apereo/cas/support/events/listener/CasAuthenticationAuthenticationEventListener.java