Class ServletFormAuthenticationMechanism
java.lang.Object
io.undertow.security.impl.FormAuthenticationMechanism
io.undertow.servlet.handlers.security.ServletFormAuthenticationMechanism
- All Implemented Interfaces:
AuthenticationMechanism
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 ClassesNested classes/interfaces inherited from interface io.undertow.security.api.AuthenticationMechanism
AuthenticationMechanism.AuthenticationMechanismOutcome, AuthenticationMechanism.ChallengeResult -
Field Summary
FieldsFields inherited from class io.undertow.security.impl.FormAuthenticationMechanism
DEFAULT_POST_LOCATION, LOCATION_ATTRIBUTE -
Constructor Summary
ConstructorsConstructorDescriptionServletFormAuthenticationMechanism(FormParserFactory formParserFactory, String name, String loginPage, String errorPage) ServletFormAuthenticationMechanism(FormParserFactory formParserFactory, String name, String loginPage, String errorPage, IdentityManager identityManager) ServletFormAuthenticationMechanism(FormParserFactory formParserFactory, String name, String loginPage, String errorPage, IdentityManager identityManager, boolean saveOriginalRequest) ServletFormAuthenticationMechanism(FormParserFactory formParserFactory, String name, String loginPage, String errorPage, String postLocation) ServletFormAuthenticationMechanism(String name, String loginPage, String errorPage) Deprecated.ServletFormAuthenticationMechanism(String name, String loginPage, String errorPage, String postLocation) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidhandleRedirectBack(HttpServerExchange exchange) protected IntegerservePage(HttpServerExchange exchange, String location) protected voidstoreInitialLocation(HttpServerExchange exchange) protected voidstoreInitialLocation(HttpServerExchange exchange, byte[] bytes, int contentLength) This method doesn't save content of request but instead uses data from parameter.Methods inherited from class io.undertow.security.impl.FormAuthenticationMechanism
authenticate, runFormAuth, sendChallenge
-
Field Details
-
FACTORY
-
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(FormParserFactory formParserFactory, String name, String loginPage, String errorPage, String postLocation) -
ServletFormAuthenticationMechanism
public ServletFormAuthenticationMechanism(FormParserFactory formParserFactory, String name, String loginPage, String errorPage) -
ServletFormAuthenticationMechanism
public ServletFormAuthenticationMechanism(FormParserFactory formParserFactory, String name, String loginPage, String errorPage, IdentityManager identityManager) -
ServletFormAuthenticationMechanism
public ServletFormAuthenticationMechanism(FormParserFactory formParserFactory, String name, String loginPage, String errorPage, IdentityManager identityManager, boolean saveOriginalRequest)
-
-
Method Details
-
servePage
- Overrides:
servePagein classFormAuthenticationMechanism
-
storeInitialLocation
- Overrides:
storeInitialLocationin classFormAuthenticationMechanism
-
storeInitialLocation
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
- Overrides:
handleRedirectBackin classFormAuthenticationMechanism
-