Class AuthenticationFailureEvent

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

public class AuthenticationFailureEvent extends Object implements AuthenticationProviderEvent, CredentialEvent, FailureEvent
An event which is triggered whenever a user's credentials fail to be authenticated. The credentials that failed to be authenticated are included within this event, and can be retrieved using getCredentials().
  • Constructor Details

    • AuthenticationFailureEvent

      public AuthenticationFailureEvent(Credentials credentials)
      Creates a new AuthenticationFailureEvent which represents a failure to authenticate the given credentials where there is no specific AuthenticationProvider nor Throwable associated with the failure.
      Parameters:
      credentials - The credentials which failed authentication.
    • AuthenticationFailureEvent

      public AuthenticationFailureEvent(Credentials credentials, Throwable failure)
      Creates a new AuthenticationFailureEvent which represents a failure to authenticate the given credentials where there is no specific AuthenticationProvider causing the failure.
      Parameters:
      credentials - The credentials which failed authentication.
      failure - The Throwable that was thrown resulting in the failure, or null if there is no such Throwable.
    • AuthenticationFailureEvent

      public AuthenticationFailureEvent(Credentials credentials, AuthenticationProvider authProvider, Throwable failure)
      Creates a new AuthenticationFailureEvent which represents a failure to authenticate the given credentials.
      Parameters:
      credentials - The credentials which failed authentication.
      authProvider - The AuthenticationProvider that caused the failure, or null if there is no such AuthenticationProvider.
      failure - The Throwable that was thrown resulting in the failure, or null if there is no such Throwable.
  • Method Details

    • 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()
      Returns the AuthenticationProvider that resulted in the event, if any. If the event occurred without any definite causing AuthenticationProvider, this may be null.

      NOTE: In the case of an authentication failure, cases where this may be null include if authentication failed without a definite single AuthenticationProvider causing that failure, such as if the failure is caused by every AuthenticationProvider passively refusing to authenticate the user but without explicitly rejecting the user (returning null for calls to AuthenticationProvider.authenticateUser(org.apache.guacamole.net.auth.Credentials)), or if the failure is external to any installed AuthenticationProvider (such as within a Listener.

      Specified by:
      getAuthenticationProvider in interface AuthenticationProviderEvent
      Returns:
      The AuthenticationProvider that resulted in the event, or null if no such AuthenticationProvider is known.
    • getFailure

      public Throwable getFailure()
      Returns the Throwable that represents the failure that occurred, if any. If the failure was recognized but without a definite known error, this may be null.

      NOTE: In the case of an authentication failure, cases where this may be null include if authentication failed without a known error, such as if the failure is caused by every AuthenticationProvider passively refusing to authenticate the user but without explicitly rejecting the user (returning null for calls to AuthenticationProvider.authenticateUser(org.apache.guacamole.net.auth.Credentials)).

      Specified by:
      getFailure in interface FailureEvent
      Returns:
      The Throwable that represents the failure that occurred, or null if no such Throwable is known.