Class AuthenticationFailed

  • All Implemented Interfaces:
    AuthenticationResponse, java.io.Serializable

    public class AuthenticationFailed
    extends java.lang.Object
    implements AuthenticationResponse
    Signalises an authentication failure and stores the failure reason.
    Since:
    1.0
    Author:
    Sergio del Amo
    See Also:
    Serialized Form
    • Constructor Detail

      • AuthenticationFailed

        public AuthenticationFailed()
        Necessary for JSON Serialization.
      • AuthenticationFailed

        public AuthenticationFailed​(AuthenticationFailureReason authenticationFailure)
        Parameters:
        authenticationFailure - AuthenticationFailure enum which represents the failure reason
    • Method Detail

      • createMessage

        protected java.lang.String createMessage​(AuthenticationFailureReason authenticationFailure)
        Generates a Title Case string for give authentication Failure.
        Parameters:
        authenticationFailure - the authentication failure
        Returns:
        the Title Case String
      • getMessage

        public java.util.Optional<java.lang.String> getMessage()
        message getter.
        Specified by:
        getMessage in interface AuthenticationResponse
        Returns:
        Failure message
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object