Package org.apereo.cas.authentication
Class AuthenticationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.apereo.cas.authentication.RootCasException
-
- org.apereo.cas.authentication.AuthenticationException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
PrincipalException
,UnauthorizedAuthenticationException
public class AuthenticationException extends RootCasException
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()
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.lang.Throwable handlerError)
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.
-
Method Summary
-
Methods inherited from class org.apereo.cas.authentication.RootCasException
getCode
-
-
-
-
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()
-
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.lang.Throwable handlerError)
-
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.
-
-