java.lang.Object
io.goobi.viewer.model.security.authentication.LoginResult

public class LoginResult extends Object

LoginResult class.

Author:
Florian Alpers
  • Constructor Details

    • LoginResult

      public LoginResult(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Optional<User> user, boolean loginRefused)

      Constructor for LoginResult.

      Parameters:
      request - a HttpServletRequest object.
      response - a HttpServletResponse object.
      user - a Optional object.
      loginRefused - true if the login has been refused even if the user may exist and be valid. Typically true for wrong password
    • LoginResult

      public LoginResult(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Optional<User> user, boolean loginRefused, long delay)

      Constructor for LoginResult.

      Parameters:
      request - a HttpServletRequest object.
      response - a HttpServletResponse object.
      user - a Optional object.
      loginRefused - true if the login has been refused even if the user may exist and be valid. Typically true for wrong password
      delay - a configured delay time
    • LoginResult

      public LoginResult(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AuthenticationProviderException exception)

      Constructor for LoginResult.

      Parameters:
      request - a HttpServletRequest object.
      response - a HttpServletResponse object.
      exception - a AuthenticationProviderException object.
    • LoginResult

      public LoginResult(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AuthenticationProviderException exception, long delay)

      Constructor for LoginResult.

      Parameters:
      request - a HttpServletRequest object.
      response - a HttpServletResponse object.
      exception - a AuthenticationProviderException object.
      delay - a configured delay time
  • Method Details

    • getRequest

      public javax.servlet.http.HttpServletRequest getRequest()

      Getter for the field request.

      Returns:
      the request
    • getResponse

      public javax.servlet.http.HttpServletResponse getResponse()

      Getter for the field response.

      Returns:
      the response
    • getUser

      public Optional<User> getUser() throws AuthenticationProviderException

      Getter for the field user.

      Returns:
      the user Optional containing the user if login was successful. Otherwise an empty optional
      Throws:
      AuthenticationProviderException - if any.
    • isRedirected

      public Future<Boolean> isRedirected(long timeout)

      isRedirected.

      Parameters:
      timeout - a long.
      Returns:
      a Future object.
    • setRedirected

      public void setRedirected()

      setRedirected.

    • isRefused

      public boolean isRefused()

      isRefused.

      Returns:
      the refused
    • getDelay

      public long getDelay()
      Returns:
      the delay