Intercepting the request using RequestHandler

0
I use Mendix 8.8.1. I was able to add a requesthandler in my java action. I wanted to capture client certificate using Java X509Certificate API. IIS was configured to enable SSL (https). I browse my app, https://www.myapp.com, it prompts for client certificate and I selected a certificate. It was redirected to localhost:8080/myRequestHandler. protected void processRequest(IMxRuntimeRequest req, .....){ X509Certificate x509Cert[] = (X509Certificate[]) req.getHttpServletRequest() .getAttribute("javax.servlet.request.X509Certificate"); I am trying to read X509Certificate from processRequest method parameter IMxRuntimeRequest (req.getHttpServletRequest().getAttribute(“javax.servlet.request.X509Certificate”); The above line threw nullpointerexception. any pointers would be greatly appreciated. I have done this before in some other application. The only difference is that this is Mendix environment. Thanks.
asked
1 answers
0

I have not worked with this request handler yet.

But based on few documentation I read, a wild guess could be, could you try

request.getHttpServletRequest().getAttribute 

Just in case, if your certificate is still attached with HttpServletRequest and not in IMxRuntimeRequest

If IMxRuntimeRequest extends HttpservletRequest, this does not help. I could not find the API details of IMxRuntimeRequest

answered