Class HttpHeaderProvider

java.lang.Object
io.goobi.viewer.model.security.authentication.HttpAuthenticationProvider
io.goobi.viewer.model.security.authentication.HttpHeaderProvider
All Implemented Interfaces:
IAuthenticationProvider

public class HttpHeaderProvider extends HttpAuthenticationProvider
  • Field Details

  • Constructor Details

    • HttpHeaderProvider

      public HttpHeaderProvider(String name, String label, String url, String image, long timeoutMillis, String parameterType, String parameterName)
      Parameters:
      name -
      label -
      url -
      image -
      timeoutMillis -
      parameterType -
      parameterName -
  • Method Details

    • login

      Returns a future containing the login result upon completion. The result optionally contains the logged in User as well as the HttpServletRequest and HttpServletResponse to be used to complete the login and possible request forwarding If an error occurs and the request can not be processed, an AuthenticationException must be thrown. If a login has been refused, the exact reasons can be determined using the methods User.isActive(), User.isSuspended() and LoginResult.isRefused()
      Parameters:
      ssoId - a String object.
      password - A string to be used as a password or similar for login. If the provider does not require such a string, this can be left empty or null
      Returns:
      A CompletableFuture which is resolved once login is completed and contains a LoginResult
      Throws:
      AuthenticationProviderException - if any.
    • loadUser

      public User loadUser(String parameterValue)
      Parameters:
      parameterValue -
      Returns:
      User if found; otherwise null
    • completeLogin

      public Future<Boolean> completeLogin(String ssoId, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Parameters:
      ssoId - User identifier
      request - a HttpServletRequest object.
      response - a HttpServletResponse object.
      Returns:
      a Future object.
    • logout

      public void logout() throws AuthenticationProviderException
      Logs the user out
      Throws:
      AuthenticationProviderException - if any.
    • allowsPasswordChange

      public boolean allowsPasswordChange()
      Check whether this authentication service allows user to edit their password or to reset it
      Returns:
      true if the authentication service provides means to change or reset the user password
    • allowsNicknameChange

      public boolean allowsNicknameChange()

      allowsNicknameChange.

      Returns:
      true if the nickname may be changed and is not essential for user identification
    • allowsEmailChange

      public boolean allowsEmailChange()

      allowsEmailChange.

      Returns:
      true if the email may be changed and is not essential for user identification
    • getAddUserToGroups

      public List<String> getAddUserToGroups()

      getAddUserToGroups.

      Specified by:
      getAddUserToGroups in interface IAuthenticationProvider
      Overrides:
      getAddUserToGroups in class HttpAuthenticationProvider
      Returns:
      a List object.
    • setAddUserToGroups

      public void setAddUserToGroups(List<String> addUserToGroups)

      setAddUserToGroups.

      Specified by:
      setAddUserToGroups in interface IAuthenticationProvider
      Overrides:
      setAddUserToGroups in class HttpAuthenticationProvider
      Parameters:
      addUserToGroups - a List object.
    • getParameterType

      public String getParameterType()
      Returns:
      the parameterType
    • getParameterName

      public String getParameterName()
      Returns:
      the parameterName
    • setLoginResult

      public void setLoginResult(LoginResult loginResult)