Interface IAuthenticationProvider

All Known Implementing Classes:
BibliothecaProvider, HttpAuthenticationProvider, HttpHeaderProvider, LitteraProvider, LocalAuthenticationProvider, OpenIdProvider, VuFindProvider, XServiceProvider

public interface IAuthenticationProvider
Interface of all user authentication related actions, particularly logging in and out of a viewer user account
Author:
Florian Alpers
  • Method Details

    • getName

      String getName()
      Returns an unique name for the authentication provider implementation
      Returns:
      The name of the provider
    • 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 isActive, isSuspended and isRefused
      Parameters:
      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
      loginName - a String object.
      Returns:
      A CompletableFuture which is resolved once login is completed and contains a LoginResult
      Throws:
      AuthenticationProviderException - if any.
    • logout

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

      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
    • getType

      String getType()
      The provider type. This should either be "local", "userpassword" or "openId". This value is used to determine where this provider is displayed. Providers with the same type are displayed together
      Returns:
      The type of the provider
    • allowsNicknameChange

      boolean allowsNicknameChange()

      allowsNicknameChange.

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

      boolean allowsEmailChange()

      allowsEmailChange.

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

      List<String> getAddUserToGroups()

      getAddUserToGroups.

      Returns:
      a List object.
    • setAddUserToGroups

      void setAddUserToGroups(List<String> addUserToGroups)

      setAddUserToGroups.

      Parameters:
      addUserToGroups - a List object.
    • getRedirectUrl

      String getRedirectUrl()
      Returns:
      the redirectUrl
    • setRedirectUrl

      void setRedirectUrl(String redirectUrl)
      Parameters:
      redirectUrl - the redirectUrl to set