Interface AuthenticationProvider


public interface AuthenticationProvider
Interface for an authentication provider. With this interface you can add your own authentication mechanism. If you want to register your custom provider, then you will need to write a server plugin. In the method ServerPlugin.registerExtension(ServerPluginManager spm) of your server plugin you write:

 spm.register( AuthenticationProvider.class, new YourCustomAuthenticationProvider() );
 
to register your provider.
Since:
inetcore 1.1
  • Method Details

    • name

      @Nonnull String name()
      The unique name of this provider. It is used to save this provider in the configuration.
      Returns:
      the name - must be unique
      Since:
      inetcore 1.1
    • getPriority

      int getPriority()
      The order of providers if the "automatic" login method is selected and the order in drop down boxes of the GUI is determined using this priority value.
      Returns:
      the priority value for where to place this provider in lists of providers
      Since:
      inetcore 1.1
    • create

      @Nonnull LoginProcessor create(@Nonnull AuthenticationDescription description)
      Create an instance of LoginProcessor for the given description.
      Parameters:
      description - the description of the login
      Returns:
      a login processor
      Since:
      inetcore 4.0
    • createLoginProcessor

      @Nullable LoginProcessor createLoginProcessor(@Nonnull AuthenticationDescription description, @Nullable String authorization, javax.servlet.http.HttpServletRequest request, boolean isApplication)
      Create an instance of a LoginProcessor if possible. It also try to login.

      If the description is invalid then it return null. It also returns null if the given Authorization header is not supported.

      Parameters:
      description - the description of the login
      authorization - the current HTTP Authorization header
      request - current request
      isApplication - true, if the request come NOT from a browser.
      Returns:
      a LoginProcessor
      Since:
      inetcore 3.2
    • getDisplayName

      @Nonnull String getDisplayName(@Nullable Map<String,String> settings)
      Get the display name for the GUI.
      Parameters:
      settings - the settings in the configuration manager
      Returns:
      the display name
      Since:
      inetcore 4.0
    • getAuthenticationDescription

      @Nullable AuthenticationDescription getAuthenticationDescription(@Nonnull Map<String,String> settings, boolean isApplication, boolean isProxy)
      Get the AuthenticationDescription for the given configuration settings and logging
      Parameters:
      settings - the settings in the configuration manager
      isApplication - if the call was make from an application
      isProxy - if the call was make through an proxy
      Returns:
      the description or null if not possible for the given settings
      Since:
      inetcore 4.0
    • applySettings

      @Nonnull Map<String,String> applySettings(@Nonnull Map<String,String> clientProperties, @Nonnull Configuration config, @Nonnull List<Map<String,String>> originalInConfig)
      Convert the properties from the GUI to the properties that should be saved. Typical this is a filter only.
      Parameters:
      clientProperties - properties from the GUI
      config - the Configuration that will edit in the configuration manager GUI
      originalInConfig - the parsed, read only login settings in configuration
      Returns:
      the value to saved
      Since:
      22.10
    • transformGuiProperties

      default void transformGuiProperties(@Nonnull Map<String,Object> properties)
      Transform the loaded values to the format needed for the configuration GUI
      Parameters:
      properties - the loaded properties
      Since:
      inetcore 5.0
    • isMultipleDescriptionSupported

      default boolean isMultipleDescriptionSupported()
      Returns if the provider supports multiple AuthenticationDescription.
      Returns:
      true, if this provider supports multiple logins with different configuration
      Since:
      inetcore 4.0
    • hasAdditionalConfigurationAction

      default boolean hasAdditionalConfigurationAction()
      Returns true, if the provider has an additional configuration page when adding the provider to the list of available login provider. Default is true: providers should have an additional configuration page by default
      Returns:
      true, if the provider has an additional configuration page
      Since:
      21.10