public class AuthenticationException
extends java.lang.RuntimeException
AuthenticationManager to signal authentication failure.
Authentication failure typically occurs when one or more AuthenticationHandler components
fail to authenticate credentials. This exception contains information about handler successes
and failures that may be used by higher-level components to determine subsequent behavior.| Constructor and Description |
|---|
AuthenticationException()
Instantiates a new Authentication exception.
|
AuthenticationException(java.util.Map<java.lang.String,java.lang.Class<? extends java.lang.Exception>> handlerErrors)
Creates a new instance for the case when no handlers succeeded.
|
AuthenticationException(java.util.Map<java.lang.String,java.lang.Class<? extends java.lang.Exception>> handlerErrors,
java.util.Map<java.lang.String,HandlerResult> handlerSuccesses)
Creates a new instance for the case when there are both handler successes and failures.
|
AuthenticationException(java.lang.String msg)
Creates a new instance for the case when no handlers were attempted, i.e.
|
AuthenticationException(java.lang.String message,
java.util.Map<java.lang.String,java.lang.Class<? extends java.lang.Exception>> handlerErrors,
java.util.Map<java.lang.String,HandlerResult> handlerSuccesses)
Creates a new instance for the case when there are both handler successes and failures and a custom
error message is required.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.Class<? extends java.lang.Exception>> |
getHandlerErrors()
Gets an unmodifiable map of handler names to errors.
|
java.util.Map<java.lang.String,HandlerResult> |
getHandlerSuccesses()
Gets an unmodifiable map of handler names to authentication successes.
|
public AuthenticationException(java.lang.String msg)
msg - the msgpublic AuthenticationException()
public AuthenticationException(java.util.Map<java.lang.String,java.lang.Class<? extends java.lang.Exception>> handlerErrors)
handlerErrors - Map of handler names to errors.public AuthenticationException(java.util.Map<java.lang.String,java.lang.Class<? extends java.lang.Exception>> handlerErrors,
java.util.Map<java.lang.String,HandlerResult> handlerSuccesses)
handlerErrors - Map of handler names to errors.handlerSuccesses - Map of handler names to authentication successes.public AuthenticationException(java.lang.String message,
java.util.Map<java.lang.String,java.lang.Class<? extends java.lang.Exception>> handlerErrors,
java.util.Map<java.lang.String,HandlerResult> handlerSuccesses)
message - the message associated with this error.handlerErrors - Map of handler names to errors.handlerSuccesses - Map of handler names to authentication successes.public java.util.Map<java.lang.String,java.lang.Class<? extends java.lang.Exception>> getHandlerErrors()
public java.util.Map<java.lang.String,HandlerResult> getHandlerSuccesses()