Class ServletAuthenticationConstraintHandler
- java.lang.Object
-
- io.undertow.security.handlers.AuthenticationConstraintHandler
-
- io.undertow.servlet.handlers.security.ServletAuthenticationConstraintHandler
-
- All Implemented Interfaces:
HttpHandler
public class ServletAuthenticationConstraintHandler extends AuthenticationConstraintHandler
A simple handler that just sets the auth type to REQUIRED after iterating each of theSingleConstraintMatchinstances and identifying if any require authentication.- Author:
- Stuart Douglas, Darran Lofthouse
-
-
Constructor Summary
Constructors Constructor Description ServletAuthenticationConstraintHandler(HttpHandler next)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanisAuthenticationRequired(HttpServerExchange exchange)Evaluate the current request and indicate if authentication is required for the current request.-
Methods inherited from class io.undertow.security.handlers.AuthenticationConstraintHandler
handleRequest
-
-
-
-
Constructor Detail
-
ServletAuthenticationConstraintHandler
public ServletAuthenticationConstraintHandler(HttpHandler next)
-
-
Method Detail
-
isAuthenticationRequired
protected boolean isAuthenticationRequired(HttpServerExchange exchange)
Description copied from class:AuthenticationConstraintHandlerEvaluate the current request and indicate if authentication is required for the current request. By default this will always return true, sub-classes will override this method to provide a more specific check.- Overrides:
isAuthenticationRequiredin classAuthenticationConstraintHandler- Parameters:
exchange- - theHttpServerExchangefor the current request to decide if authentication is required.- Returns:
- true if authentication is required, false otherwise.
-
-