Class 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
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ServletFormAuthenticationMechanism.Factory  
      • Nested classes/interfaces inherited from interface io.undertow.security.api.AuthenticationMechanism

        io.undertow.security.api.AuthenticationMechanism.AuthenticationMechanismOutcome, io.undertow.security.api.AuthenticationMechanism.ChallengeResult
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String SAVE_ORIGINAL_REQUEST  
      • Fields inherited from class io.undertow.security.impl.FormAuthenticationMechanism

        DEFAULT_POST_LOCATION, LOCATION_ATTRIBUTE
    • Constructor Summary

      Constructors 
      Constructor Description
      ServletFormAuthenticationMechanism​(io.undertow.server.handlers.form.FormParserFactory formParserFactory, java.lang.String name, java.lang.String loginPage, java.lang.String errorPage)  
      ServletFormAuthenticationMechanism​(io.undertow.server.handlers.form.FormParserFactory formParserFactory, java.lang.String name, java.lang.String loginPage, java.lang.String errorPage, io.undertow.security.idm.IdentityManager identityManager)  
      ServletFormAuthenticationMechanism​(io.undertow.server.handlers.form.FormParserFactory formParserFactory, java.lang.String name, java.lang.String loginPage, java.lang.String errorPage, io.undertow.security.idm.IdentityManager identityManager, boolean saveOriginalRequest)  
      ServletFormAuthenticationMechanism​(io.undertow.server.handlers.form.FormParserFactory formParserFactory, java.lang.String name, java.lang.String loginPage, java.lang.String errorPage, java.lang.String postLocation)  
      ServletFormAuthenticationMechanism​(java.lang.String name, java.lang.String loginPage, java.lang.String errorPage)
      Deprecated.
      ServletFormAuthenticationMechanism​(java.lang.String name, java.lang.String loginPage, java.lang.String errorPage, java.lang.String postLocation)
      Deprecated.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void handleRedirectBack​(io.undertow.server.HttpServerExchange exchange)  
      protected java.lang.Integer servePage​(io.undertow.server.HttpServerExchange exchange, java.lang.String location)  
      protected void storeInitialLocation​(io.undertow.server.HttpServerExchange exchange)  
      • Methods inherited from class io.undertow.security.impl.FormAuthenticationMechanism

        authenticate, runFormAuth, sendChallenge
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • SAVE_ORIGINAL_REQUEST

        public static final java.lang.String SAVE_ORIGINAL_REQUEST
        See Also:
        Constant Field Values
    • Constructor Detail

      • ServletFormAuthenticationMechanism

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

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

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

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

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

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

      • servePage

        protected java.lang.Integer servePage​(io.undertow.server.HttpServerExchange exchange,
                                              java.lang.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
      • handleRedirectBack

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