Package org.apereo.cas.authentication
Class AuthenticationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.apereo.cas.authentication.AuthenticationException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
PrincipalException
,UnauthorizedAuthenticationException
public class AuthenticationException extends java.lang.RuntimeException
Authentication raised byAuthenticationManager
to signal authentication failure. Authentication failure typically occurs when one or moreAuthenticationHandler
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.- Since:
- 4.0.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AuthenticationException()
Instantiates a new Authentication exception.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.Throwable> handlerErrors, java.util.Map<java.lang.String,AuthenticationHandlerExecutionResult> handlerSuccesses)
Creates a new instance for the case when there are both handler successes and failures and a custom error message is required.AuthenticationException(java.util.Map<java.lang.String,java.lang.Throwable> handlerErrors)
Creates a new instance for the case when no handlers succeeded.AuthenticationException(java.util.Map<java.lang.String,java.lang.Throwable> handlerErrors, java.util.Map<java.lang.String,AuthenticationHandlerExecutionResult> handlerSuccesses)
Creates a new instance for the case when there are both handler successes and failures.
-
-
-
Constructor Detail
-
AuthenticationException
public AuthenticationException(java.lang.String msg)
Creates a new instance for the case when no handlers were attempted, i.e. no successes or failures.- Parameters:
msg
- the msg
-
AuthenticationException
public AuthenticationException()
Instantiates a new Authentication exception.
-
AuthenticationException
public AuthenticationException(java.util.Map<java.lang.String,java.lang.Throwable> handlerErrors)
Creates a new instance for the case when no handlers succeeded.- Parameters:
handlerErrors
- Map of handler names to errors.
-
AuthenticationException
public AuthenticationException(java.util.Map<java.lang.String,java.lang.Throwable> handlerErrors, java.util.Map<java.lang.String,AuthenticationHandlerExecutionResult> handlerSuccesses)
Creates a new instance for the case when there are both handler successes and failures.- Parameters:
handlerErrors
- Map of handler names to errors.handlerSuccesses
- Map of handler names to authentication successes.
-
AuthenticationException
public AuthenticationException(java.lang.String message, java.util.Map<java.lang.String,java.lang.Throwable> handlerErrors, java.util.Map<java.lang.String,AuthenticationHandlerExecutionResult> handlerSuccesses)
Creates a new instance for the case when there are both handler successes and failures and a custom error message is required.- Parameters:
message
- the message associated with this error.handlerErrors
- Map of handler names to errors.handlerSuccesses
- Map of handler names to authentication successes.
-
-