code: @EventListener
      public void handleCasAuthenticationPolicyFailureEvent(final CasAuthenticationPolicyFailureEvent event) {
          if (this.casEventRepository != null) {
              val dto = prepareCasEvent(event);
              dto.setPrincipalId(event.getAuthentication().getPrincipal().getId());
              dto.putEventId(CasAuthenticationPolicyFailureEvent.class.getSimpleName());
              this.casEventRepository.save(dto);
          }
      }
docs: Handle cas authentication policy failure event.
  
  @param event the event