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 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.
    • logout

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

      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
    • 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:
      list of group names to add the user to on login
    • setAddUserToGroups

      void setAddUserToGroups(List<String> addUserToGroups)
      setAddUserToGroups.
      Parameters:
      addUserToGroups - group names to assign new or returning users to
    • getRedirectUrl

      String getRedirectUrl()
    • setRedirectUrl

      void setRedirectUrl(String redirectUrl)