Package com.networknt.rpc.security
Class JwtVerifyHandler
- java.lang.Object
-
- com.networknt.rpc.security.JwtVerifyHandler
-
- All Implemented Interfaces:
com.networknt.handler.LightHttpHandler,com.networknt.handler.MiddlewareHandler,com.networknt.security.IJwtVerifyHandler,io.undertow.server.HttpHandler
public class JwtVerifyHandler extends Object implements com.networknt.handler.MiddlewareHandler, com.networknt.security.IJwtVerifyHandler
This is a middleware handler that handles security verification for light-hybrid-4j framework. It verifies token signature and token expiration. Unlike the similar handler in light-rest-4j handles scope verification, this one doesn't as it is placed before rpc-router and exact service is unknown. The scope verification will be done in the rpc-router once the service is identified and schema is found. Both handlers share the same security.yml but just focus on different properties.- Author:
- Steve Hu
-
-
Field Summary
Fields Modifier and Type Field Description static Map<String,Object>configstatic com.networknt.security.JwtVerifierjwtVerifier
-
Constructor Summary
Constructors Constructor Description JwtVerifyHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.networknt.security.JwtVerifiergetJwtVerifier()io.undertow.server.HttpHandlergetNext()voidhandleRequest(io.undertow.server.HttpServerExchange exchange)booleanisEnabled()voidregister()com.networknt.handler.MiddlewareHandlersetNext(io.undertow.server.HttpHandler next)
-
-
-
Method Detail
-
handleRequest
public void handleRequest(io.undertow.server.HttpServerExchange exchange) throws Exception- Specified by:
handleRequestin interfaceio.undertow.server.HttpHandler- Throws:
Exception
-
getNext
public io.undertow.server.HttpHandler getNext()
- Specified by:
getNextin interfacecom.networknt.handler.MiddlewareHandler
-
setNext
public com.networknt.handler.MiddlewareHandler setNext(io.undertow.server.HttpHandler next)
- Specified by:
setNextin interfacecom.networknt.handler.MiddlewareHandler
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabledin interfacecom.networknt.handler.MiddlewareHandler
-
register
public void register()
- Specified by:
registerin interfacecom.networknt.handler.MiddlewareHandler
-
getJwtVerifier
public com.networknt.security.JwtVerifier getJwtVerifier()
- Specified by:
getJwtVerifierin interfacecom.networknt.security.IJwtVerifyHandler
-
-