Class OAuthServerHandler

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

    public class OAuthServerHandler
    extends Object
    implements LightHttpHandler
    This is a handler to simulate other gateway products to allow consumers to get a client credentials token before sending a request with the authorization header. It will return a dummy token to the consumer app so that we don't need those apps to be modified to avoid the additional cost of migration. When subsequent requests comes in, the header handler will remove the authorization header and the TokenHandler will get a real JWT token from the downstream API authorization server and put it into the Authorization header. This handler is expecting that the RequestBodyInterceptor is used so that we can get the request body in a map structure in the handler.
    Author:
    Steve Hu
    • Constructor Detail

      • OAuthServerHandler

        public OAuthServerHandler()
    • Method Detail

      • handleRequest

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