Class LoginAuthenticationEvent

All Implemented Interfaces:
SerializableAsMap, Event
Direct Known Subclasses:
SuccessAuthenticationEvent, SuccessSsoAuthenticationEvent

public abstract class LoginAuthenticationEvent extends AuthenticationAttemptEvent
A login authentication event.
Since:
2.2.0
  • Constructor Details

    • LoginAuthenticationEvent

      public LoginAuthenticationEvent(String sessionId, String subject, String acr, AuthenticationAttributes authenticationAttributes, Instant authenticationInstant, @Nullable String serviceProviderId, String profileId)
      Create a new LoginAuthenticationEvent.
      Parameters:
      sessionId - The ID of the session bound to this login
      subject - The subject of whoever logged in
      acr - The ACR (Authentication Context Class Reference, i.e., authentication method) used for login
      authenticationAttributes - The AuthenticationAttributes returned from the login
      authenticationInstant - The instant in time when the login happened
      serviceProviderId - The service provider used for authentication
      profileId - The ID of the profile from which this event originated
    • LoginAuthenticationEvent

      public LoginAuthenticationEvent(String sessionId, String subject, String acr, AuthenticationAttributes authenticationAttributes, Instant authenticationInstant, @Nullable String oauthProfileId, @Nullable String oauthClientId, String profileId)
      Create a new LoginAuthenticationEvent.
      Parameters:
      sessionId - The ID of the session bound to this login
      subject - The subject of whoever logged in
      acr - The ACR (Authentication Context Class Reference, i.e., authentication method) used for login
      authenticationAttributes - The AuthenticationAttributes returned from the login
      authenticationInstant - The instant in time when the login happened
      oauthProfileId - The OAuth profile requesting authentication
      oauthClientId - The OAuth client requesting authentication
      profileId - The ID of the profile from which this event originated
  • Method Details

    • getAuthenticationInstant

      public Instant getAuthenticationInstant()
      Returns the instant of authentication.
      Returns:
      the instant of authentication
    • getAuthenticationAttributes

      public AuthenticationAttributes getAuthenticationAttributes()
      Get the AuthenticationAttributes created by the authentication.
      Returns:
      the AuthenticationAttributes created by the authentication
    • asMap

      public Map<String,Object> asMap()
      Description copied from interface: Event
      Get a map representation of this Event.
      Specified by:
      asMap in interface Event
      Specified by:
      asMap in interface SerializableAsMap
      Overrides:
      asMap in class UserAuthenticationEvent
      Returns:
      a Map representation of this Event. This can be used to serialize events. Sub-types are encouraged to override this method, calling super.asMap() and enriching the returned mutable Map with the more specific information added by the sub-type.