Class ServletFormAuthenticationMechanism

java.lang.Object
io.undertow.security.impl.FormAuthenticationMechanism
io.undertow.servlet.handlers.security.ServletFormAuthenticationMechanism
All Implemented Interfaces:
io.undertow.security.api.AuthenticationMechanism

public class ServletFormAuthenticationMechanism extends io.undertow.security.impl.FormAuthenticationMechanism
Servlet handler for FORM authentication. Instead of using a redirect it serves up error and login pages immediately using a forward
Author:
Stuart Douglas
  • Field Details

    • FACTORY

      public static final io.undertow.security.api.AuthenticationMechanismFactory FACTORY
    • SAVE_ORIGINAL_REQUEST

      public static final String SAVE_ORIGINAL_REQUEST
      See Also:
  • Constructor Details

    • ServletFormAuthenticationMechanism

      @Deprecated public ServletFormAuthenticationMechanism(String name, String loginPage, String errorPage)
      Deprecated.
    • ServletFormAuthenticationMechanism

      @Deprecated public ServletFormAuthenticationMechanism(String name, String loginPage, String errorPage, String postLocation)
      Deprecated.
    • ServletFormAuthenticationMechanism

      public ServletFormAuthenticationMechanism(io.undertow.server.handlers.form.FormParserFactory formParserFactory, String name, String loginPage, String errorPage, String postLocation)
    • ServletFormAuthenticationMechanism

      public ServletFormAuthenticationMechanism(io.undertow.server.handlers.form.FormParserFactory formParserFactory, String name, String loginPage, String errorPage)
    • ServletFormAuthenticationMechanism

      public ServletFormAuthenticationMechanism(io.undertow.server.handlers.form.FormParserFactory formParserFactory, String name, String loginPage, String errorPage, io.undertow.security.idm.IdentityManager identityManager)
    • ServletFormAuthenticationMechanism

      public ServletFormAuthenticationMechanism(io.undertow.server.handlers.form.FormParserFactory formParserFactory, String name, String loginPage, String errorPage, io.undertow.security.idm.IdentityManager identityManager, boolean saveOriginalRequest)
    • ServletFormAuthenticationMechanism

      public ServletFormAuthenticationMechanism(io.undertow.server.handlers.form.FormParserFactory formParserFactory, String name, String loginPage, String errorPage, String defaultPage, boolean overrideInitial, io.undertow.security.idm.IdentityManager identityManager, boolean saveOriginalRequest)
  • Method Details

    • servePage

      protected Integer servePage(io.undertow.server.HttpServerExchange exchange, String location)
      Overrides:
      servePage in class io.undertow.security.impl.FormAuthenticationMechanism
    • storeInitialLocation

      protected void storeInitialLocation(io.undertow.server.HttpServerExchange exchange)
      Overrides:
      storeInitialLocation in class io.undertow.security.impl.FormAuthenticationMechanism
    • storeInitialLocation

      protected void storeInitialLocation(io.undertow.server.HttpServerExchange exchange, byte[] bytes, int contentLength)
      This method doesn't save content of request but instead uses data from parameter. This should be used in case that data from request was already read and therefore it is not possible to save them.
      Parameters:
      exchange -
      bytes -
      contentLength -
    • handleRedirectBack

      protected void handleRedirectBack(io.undertow.server.HttpServerExchange exchange)
      Overrides:
      handleRedirectBack in class io.undertow.security.impl.FormAuthenticationMechanism