Stack Exchange
Access to a Client's Certificate from Inside an EJB?
Having client authentication set up on jBoss 7, I'd like to get access the client's certificate form inside an EJB, or inside a login module.
Is this possible?
Thanks

In case there is a servlet request (from JSF or ServletFilter) you can do:
ServletRequest servletRequest = (ServletRequest) facesContext.getExternalContext().getRequest();
X509Certificate[] x509Certificates = (X509Certificate[]) servletRequest.getAttribute("javax.servlet.request.X509Certificate");

