Class JwtMockHandler

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

    public class JwtMockHandler
    extends Object
    implements LightHttpHandler
    This is a jwt token provider for testing only. It should be injected into the server after it is started. Do not use it on production runtime. If you need an external OAuth2 server, please take a look at https://github.com/networknt/light-oauth2
    Author:
    Steve Hu
    • Constructor Detail

      • JwtMockHandler

        public JwtMockHandler()
    • Method Detail

      • handleRequest

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

        public org.jose4j.jwt.JwtClaims mockClaims()