Class AuthenticationSuccessEvent

java.lang.Object
org.apache.guacamole.net.event.AuthenticationSuccessEvent
All Implemented Interfaces:
AuthenticationProviderEvent, CredentialEvent, UserEvent

public class AuthenticationSuccessEvent extends Object implements UserEvent, CredentialEvent, AuthenticationProviderEvent
An event which is triggered whenever a user's credentials pass authentication. The credentials that passed authentication are included within this event, and can be retrieved using getCredentials().

If a Listener throws a GuacamoleException when handling an event of this type, successful authentication is effectively vetoed and will be subsequently processed as though the authentication failed.

  • Constructor Details

    • AuthenticationSuccessEvent

      public AuthenticationSuccessEvent(AuthenticatedUser authenticatedUser)
      Creates a new AuthenticationSuccessEvent which represents a successful authentication attempt by the user identified by the given AuthenticatedUser object. The authentication attempt is presumed to be a fresh authentication attempt unrelated to an established session (a login attempt).
      Parameters:
      authenticatedUser - The AuthenticatedUser identifying the user that successfully authenticated.
    • AuthenticationSuccessEvent

      public AuthenticationSuccessEvent(AuthenticatedUser authenticatedUser, boolean existingSession)
      Creates a new AuthenticationSuccessEvent which represents a successful authentication attempt by the user identified by the given AuthenticatedUser object. Whether the authentication attempt is related to an established session (a periodic re-authentication attempt that updates session status) or not (a fresh login attempt) is determined by the value of the provided flag.
      Parameters:
      authenticatedUser - The AuthenticatedUser identifying the user that successfully authenticated.
      existingSession - Whether this AuthenticationSuccessEvent represents an re-authentication attempt that updates the status of an established Guacamole session.
  • Method Details

    • getAuthenticatedUser

      public AuthenticatedUser getAuthenticatedUser()
      Description copied from interface: UserEvent
      Returns the AuthenticatedUser identifying the user triggering the event, if any.
      Specified by:
      getAuthenticatedUser in interface UserEvent
      Returns:
      The AuthenticatedUser identifying the user triggering the event, if any, or null if no AuthenticatedUser is associated with the event.
    • getCredentials

      public Credentials getCredentials()
      Description copied from interface: CredentialEvent
      Returns the current credentials of the user triggering the event, if any.
      Specified by:
      getCredentials in interface CredentialEvent
      Returns:
      The current credentials of the user triggering the event, if any, or null if no credentials are associated with the event.
    • getAuthenticationProvider

      public AuthenticationProvider getAuthenticationProvider()
      Description copied from interface: AuthenticationProviderEvent
      Returns the AuthenticationProvider that resulted in the event, if any. If the event occurred without any definite causing AuthenticationProvider, this may be null.
      Specified by:
      getAuthenticationProvider in interface AuthenticationProviderEvent
      Returns:
      The AuthenticationProvider that resulted in the event, or null if no such AuthenticationProvider is known.
    • isExistingSession

      public boolean isExistingSession()
      Returns whether the successful authentication attempt represented by this event is related to an established Guacamole session. During normal operation, the Guacamole web application will periodically re-authenticate with the server to verify its authentication token and update the session state, in which case the value returned by this function will be true. If the user was not already authenticated and has just initially logged in, false is returned.
      Returns:
      true if this AuthenticationSuccessEvent is related to a Guacamole session that was already established, false otherwise.