Class AuthenticationCallHandler

java.lang.Object
org.restheart.handlers.PipelinedHandler
org.restheart.security.handlers.AuthenticationCallHandler
All Implemented Interfaces:
io.undertow.server.HttpHandler

public class AuthenticationCallHandler extends PipelinedHandler
This is the PipelinedHandler version of io.undertow.security.handlers.AuthenticationCallHandler that is the final HttpHandler in the security chain, it's purpose is to act as a barrier at the end of the chain to ensure authenticate is called after the mechanisms have been associated with the context and the constraint checked. It also register metrics about failed authentications and blocks requests when the exchange has the attachment BLOCK_AUTH set to true.
Author:
Andrea Di Cesare <andrea@softinstigate.com>
  • Constructor Details

    • AuthenticationCallHandler

      public AuthenticationCallHandler(PipelinedHandler next)
  • Method Details

    • handleRequest

      public void handleRequest(io.undertow.server.HttpServerExchange exchange) throws Exception
      Only allow the request if successfully authenticated or if authentication is not required.
      Specified by:
      handleRequest in interface io.undertow.server.HttpHandler
      Specified by:
      handleRequest in class PipelinedHandler
      Parameters:
      exchange -
      Throws:
      Exception