Class BasicAuthHandler

  • All Implemented Interfaces:
    LightHttpHandler, MiddlewareHandler, io.undertow.server.HttpHandler

    public class BasicAuthHandler
    extends java.lang.Object
    implements MiddlewareHandler
    This is a middleware handler that handles basic authentication in restful APIs. It is not used in most situations as OAuth 2.0 is the standard. In certain cases for example, the server is deployed to IoT devices, basic authentication can be used to replace OAuth 2.0 handlers. There are multiple users that can be defined in basic.yml config file. And access is logged into th audit.log
    Author:
    Steve Hu
    • Constructor Detail

      • BasicAuthHandler

        public BasicAuthHandler()
    • Method Detail

      • handleRequest

        public void handleRequest​(io.undertow.server.HttpServerExchange exchange)
                           throws java.lang.Exception
        Specified by:
        handleRequest in interface io.undertow.server.HttpHandler
        Throws:
        java.lang.Exception