@Test(expected = Exception.class) public void givenFilterCreateTokenWhenClientCertChainNullThenThrowException() throws Exception { final X509AuthenticationFilter filter = new X509AuthenticationFilter(); filter.createToken(requestNull, response); }
@Override protected AuthenticationToken createToken(ServletRequest request, ServletResponse response) { X509Certificate[] clientCertChain = CertUtils.extractCert(request, useHeader); if (clientCertChain == null || clientCertChain.length < 1) { throw new ShiroException("Request do not contain any X509Certificate "); } return new X509AuthenticationToken(clientCertChain, getHost(request)); }
X509AuthenticationFilter extends AuthenticatingFilter { @Override protected AuthenticationToken createToken(ServletRequest request, ServletResponse response) { X509Certificate[] clientCertChain = CertUtils.extractCert(request, useHeader); if (clientCertChain == null || clientCertChain.length < 1) { throw new ShiroException("Request do not contain any X509Certificate "); } return new X509AuthenticationToken(clientCertChain, getHost(request)); } }
X509AuthenticationFilter extends AuthenticatingFilter { @Override protected AuthenticationToken createToken(ServletRequest request, ServletResponse response) { X509Certificate[] clientCertChain = CertUtils.extractCert(request, useHeader); if (clientCertChain == null || clientCertChain.length < 1) { throw new ShiroException("Request do not contain any X509Certificate "); } return new X509AuthenticationToken(clientCertChain, getHost(request)); }  }
X509AuthenticationFilter extends AuthenticatingFilter { @Override protected AuthenticationToken createToken(ServletRequest request, ServletResponse response) { X509Certificate[] clientCertChain = CertUtils.extractCert(request, useHeader); if (clientCertChain == null || clientCertChain.length < 1) { throw new ShiroException("Request do not contain any X509Certificate "); } return new X509AuthenticationToken(clientCertChain, getHost(request)); }  void setUseHeader(boolean useHeader); }
X509AuthenticationFilter extends AuthenticatingFilter { @Override protected AuthenticationToken createToken(ServletRequest request, ServletResponse response) { X509Certificate[] clientCertChain = CertUtils.extractCert(request, useHeader); if (clientCertChain == null || clientCertChain.length < 1) { throw new ShiroException("Request do not contain any X509Certificate "); } return new X509AuthenticationToken(clientCertChain, getHost(request)); }  void setUseHeader(boolean useHeader);  }