Package com.networknt.router
Class OAuthServerHandler
- java.lang.Object
-
- com.networknt.router.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
-
-
Field Summary
-
Fields inherited from interface com.networknt.handler.LightHttpHandler
AUDIT_CONFIG_NAME, AUDIT_ON_ERROR, AUDIT_STACK_TRACE, auditConfig, auditOnError, auditStackTrace, CONFIG_NAME, ERROR_NOT_DEFINED
-
-
Constructor Summary
Constructors Constructor Description OAuthServerHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandleRequest(io.undertow.server.HttpServerExchange exchange)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.networknt.handler.LightHttpHandler
setExchangeStatus, setExchangeStatus, setExchangeStatus
-
-