Class AuthenticationFailed
java.lang.Object
io.micronaut.security.authentication.AuthenticationFailed
- All Implemented Interfaces:
AuthenticationResponse
,Serializable
Signalises an authentication failure and stores the failure reason.
- Since:
- 1.0
- Author:
- Sergio del Amo
- See Also:
-
Constructor Summary
ConstructorDescriptionNecessary for JSON Serialization.AuthenticationFailed
(AuthenticationFailureReason authenticationFailure) AuthenticationFailed
(String message) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
createMessage
(AuthenticationFailureReason authenticationFailure) Generates a Title Case string for give authentication Failure.boolean
message getter.int
hashCode()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.security.authentication.AuthenticationResponse
isAuthenticated
-
Constructor Details
-
AuthenticationFailed
public AuthenticationFailed()Necessary for JSON Serialization. -
AuthenticationFailed
- Parameters:
authenticationFailure
- The failure reason
-
AuthenticationFailed
- Parameters:
message
- The authentication failure description
-
-
Method Details
-
createMessage
Generates a Title Case string for give authentication Failure.- Parameters:
authenticationFailure
- the authentication failure- Returns:
- the Title Case String
-
getAuthentication
- Specified by:
getAuthentication
in interfaceAuthenticationResponse
- Returns:
- The user details if the response is authenticated
-
getMessage
message getter.- Specified by:
getMessage
in interfaceAuthenticationResponse
- Returns:
- Failure message
-
equals
-
hashCode
public int hashCode() -
getReason
- Returns:
- The reason why authentication failed.
-