Package io.undertow.security.handlers
Class AuthenticationConstraintHandler
java.lang.Object
io.undertow.security.handlers.AuthenticationConstraintHandler
- All Implemented Interfaces:
HttpHandler
Handler responsible for checking the constraints for the current request and marking authentication as required if
applicable.
Sub classes can override isAuthenticationRequired to provide a constraint check, by default this handler will set
authentication as always required, authentication will be optional if this handler is omitted.
- Author:
- Darran Lofthouse
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
handleRequest
(HttpServerExchange exchange) Handle the request.protected boolean
isAuthenticationRequired
(HttpServerExchange exchange) Evaluate the current request and indicate if authentication is required for the current request.
-
Constructor Details
-
AuthenticationConstraintHandler
-
-
Method Details
-
handleRequest
Description copied from interface:HttpHandler
Handle the request.- Specified by:
handleRequest
in interfaceHttpHandler
- Parameters:
exchange
- the HTTP request/response exchange- Throws:
Exception
- See Also:
-
isAuthenticationRequired
Evaluate 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.- Parameters:
exchange
- - theHttpServerExchange
for the current request to decide if authentication is required.- Returns:
- true if authentication is required, false otherwise.
-