Class AuthenticationFailureEvent
- All Implemented Interfaces:
AuthenticationProviderEvent
,CredentialEvent
,FailureEvent
-
Constructor Summary
ConstructorsConstructorDescriptionAuthenticationFailureEvent
(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.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.AuthenticationFailureEvent
(Credentials credentials, AuthenticationProvider authProvider, Throwable failure) Creates a new AuthenticationFailureEvent which represents a failure to authenticate the given credentials. -
Method Summary
Modifier and TypeMethodDescriptionReturns the AuthenticationProvider that resulted in the event, if any.Returns the current credentials of the user triggering the event, if any.Returns the Throwable that represents the failure that occurred, if any.
-
Constructor Details
-
AuthenticationFailureEvent
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
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
Description copied from interface:CredentialEvent
Returns the current credentials of the user triggering the event, if any.- Specified by:
getCredentials
in interfaceCredentialEvent
- Returns:
- The current credentials of the user triggering the event, if any, or null if no credentials are associated with the event.
-
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 aListener
.- Specified by:
getAuthenticationProvider
in interfaceAuthenticationProviderEvent
- Returns:
- The AuthenticationProvider that resulted in the event, or null if no such AuthenticationProvider is known.
-
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 interfaceFailureEvent
- Returns:
- The Throwable that represents the failure that occurred, or null if no such Throwable is known.
-