Interface ClientSideAuthenticator

All Superinterfaces:
ConfigurablePlugin, DescribablePlugin, Plugin

public interface ClientSideAuthenticator extends Plugin
  • Field Details

  • Method Details

    • getJavaScriptFiles

      List<String> getJavaScriptFiles()
      The names of the JavaScript files that should be included on adapters page when this client side authenticator is enabled. These can be filenames, relative paths or full URLs

      For filenames, the javascript files must be placed in the folder: /server/default/conf/template/assets/scripts/authenticators

      Relative paths will use /server/default/conf/template as the base folder.

      Full URLs can also be provided.

      Returns:
      - A list of the javascript file. Null if no javascript is needed.
    • getClientSideAttributes

      Map<String,Object> getClientSideAttributes(ClientSideContext clientSideContext)
      These attributes will be added to the API response or the template that the associated adapter is rendering. Include anything here that the client side needs as context for authentication.
      Parameters:
      clientSideContext - - Information on the current request.
      Returns:
      - A map of attributes to add to the response or template.
    • authenticate

      Perform authentication based on the information provided in the request. If this authentication results in a username for the user. The attribute AUTHENTICATOR_USERNAME_ATTRIBUTE should be added to the resulting attribute map with the username value.
      Parameters:
      clientSideContext - Information on the current request.
      Returns:
      - An AuthenticateResult object that contains the result of the authentication and optionally an AttributeMap containing user attributes.
    • isClientSideRequest

      boolean isClientSideRequest(ClientSideContext clientSideContext)
      Determine if this request is a client side request that should be handled by this authenticator.
      Parameters:
      clientSideContext - Information on the current request.
      Returns:
      - true if this is a request that should be authenticated by this class, false otherwise.
    • supportsAuthnApi

      default boolean supportsAuthnApi()
    • getAuthnApiAction

      default Optional<Class<? extends ClientSideAuthenticationAction>> getAuthnApiAction()