Class VuFindProvider

java.lang.Object
io.goobi.viewer.model.security.authentication.HttpAuthenticationProvider
io.goobi.viewer.model.security.authentication.VuFindProvider
All Implemented Interfaces:
IAuthenticationProvider
Direct Known Subclasses:
XServiceProvider

public class VuFindProvider extends HttpAuthenticationProvider
Authentication provider that validates user credentials against a VuFind instance.
Author:
Florian Alpers
  • Constructor Details

    • VuFindProvider

      public VuFindProvider(String name, String label, String url, String image, long timeoutMillis)
      Creates a new VuFindProvider instance.
      Parameters:
      name - internal provider identifier
      label - human-readable provider name shown in the UI
      url - base URL of the VuFind authentication endpoint
      image - path to the provider logo image
      timeoutMillis - HTTP request timeout in milliseconds
  • Method Details

    • logout

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

      public CompletableFuture<LoginResult> login(String loginName, String password) throws AuthenticationProviderException
      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:
      loginName - login name or identifier supplied by the user
      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.
    • allowsPasswordChange

      public boolean allowsPasswordChange()
      Checks 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