anchor.diff:  
   To that end, you may want to supply additional mappings to the publisher via the `setAdditionalExceptionMappings` method:
   
  -[source,java]
  +====
  +.Java
  +[source,java,role="primary"]
   ----
   @Bean
   public AuthenticationEventPublisher authenticationEventPublisher
  
positive.code:     return authenticationEventPublisher;
  }
  ----
  
negative.code:     }
  }
  ----
  
  .Kotlin
  [source,kotlin,role="secondary"]
  ----
  @Component
  class AuthenticationEvents {
      @EventListener
      fun onSuccess(success: AuthenticationSuccessEvent?) {
          // ...
      }
  
      @EventListener
      fun onFailure(failures: AbstractAuthenticationFailureEvent?) {
          // ...
      }
  }
  ----
  ====
  
  While similar to `AuthenticationSuccessHandler` and `AuthenticationFailureHandler`, these are nice in that they can be used independently from the servlet API.
  
  