code: @EventListener
      public void handleCasRiskyAuthenticationDetectedEvent(final CasRiskyAuthenticationDetectedEvent event) {
          if (this.casEventRepository != null) {
              val dto = prepareCasEvent(event);
              dto.putEventId(event.getService().getName());
              dto.setPrincipalId(event.getAuthentication().getPrincipal().getId());
              this.casEventRepository.save(dto);
          }
      }
docs: Handle cas risky authentication detected event.
  
  @param event the event