Class AuthenticationResponse

All Implemented Interfaces:
Message, Result

public class AuthenticationResponse extends AbstractResult
Synthetic response object that encapsulates data used for authentication.
  • Field Details

    • HASH_CODE_SEED

      private static final int HASH_CODE_SEED
      hash code seed.
      See Also:
    • authenticationHandlerResponse

      private AuthenticationHandlerResponse authenticationHandlerResponse
      Result of the authentication operation.
    • resolvedDn

      private String resolvedDn
      Resolved DN.
    • ldapEntry

      private LdapEntry ldapEntry
      Ldap entry of authenticated user.
    • accountState

      private AccountState accountState
      Account state.
  • Constructor Details

    • AuthenticationResponse

      private AuthenticationResponse()
      Default constructor.
    • AuthenticationResponse

      public AuthenticationResponse(AuthenticationHandlerResponse response, String dn, LdapEntry entry)
      Creates a new authentication response.
      Parameters:
      response - authentication handler response
      dn - produced by the DN resolver
      entry - of the authenticated user
  • Method Details

    • isSuccess

      public boolean isSuccess()
      Returns whether the authentication handler produced a AuthenticationResultCode.AUTHENTICATION_HANDLER_SUCCESS result.
      Returns:
      whether authentication was successful
    • getAuthenticationResultCode

      public AuthenticationResultCode getAuthenticationResultCode()
    • getAuthenticationHandlerResponse

      public AuthenticationHandlerResponse getAuthenticationHandlerResponse()
    • getResolvedDn

      public String getResolvedDn()
      Returns the DN that was resolved in order to perform authentication.
      Returns:
      resolved dn
    • getLdapEntry

      public LdapEntry getLdapEntry()
      Returns the ldap entry of the authenticated user.
      Returns:
      ldap entry
    • getAccountState

      public AccountState getAccountState()
      Returns the account state associated with the authenticated user.
      Returns:
      account state
    • setAccountState

      public void setAccountState(AccountState state)
      Sets the account state for the authenticated user.
      Parameters:
      state - for this user
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class AbstractResult
    • hashCode

      public int hashCode()
      Description copied from class: AbstractMessage
      Returns the hash code for this object.
      Specified by:
      hashCode in class AbstractMessage
      Returns:
      hash code
    • toString

      public String toString()
      Overrides:
      toString in class AbstractResult
    • builder

      protected static AuthenticationResponse.Builder builder()
      Creates a builder for this class.
      Returns:
      new builder