java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.SecurityException
io.quarkus.security.AuthenticationFailedException
- All Implemented Interfaces:
AuthenticationException,Serializable
public final class AuthenticationFailedException
extends SecurityException
implements AuthenticationException
An exception that should be thrown (or otherwise returned to the client for
async implementations) by
IdentityProvider implementations if the
authentication failed.
This can be used by a mechanism to determine if an authentication failure was due to bad credentials vs some other form of internal failure.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAuthenticationFailedException(String errorMessage) AuthenticationFailedException(String errorMessage, Throwable cause) AuthenticationFailedException(String errorMessage, Map<String, Object> attributes) AuthenticationFailedException(Throwable cause, Map<String, Object> attributes) AuthenticationFailedException(Map<String, Object> attributes) -
Method Summary
Modifier and TypeMethodDescription<T> TgetAttribute(String name) Provides an attribute that allows to better understand the cause of the authentication failure.Provides attributes that allow to better understand the cause of the authentication failure.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
AuthenticationFailedException
public AuthenticationFailedException() -
AuthenticationFailedException
-
AuthenticationFailedException
-
AuthenticationFailedException
-
AuthenticationFailedException
-
AuthenticationFailedException
-
AuthenticationFailedException
-
AuthenticationFailedException
-
-
Method Details
-
getAttribute
Provides an attribute that allows to better understand the cause of the authentication failure.- Type Parameters:
T- The type of the authentication failure attribute- Parameters:
name- The authentication failure attribute name- Returns:
- The authentication attribute value or null if the attribute with this name does not exist
-
getAttributes
Provides attributes that allow to better understand the cause of the authentication failure.- Returns:
- authentication failure attributes; never null
-