sslContext.setKeyStoreBytes(ByteStreams.toByteArray(keyStore)); // contains server keypair
sslContext.setKeyStorePass("asdfgh");
sslContext.setTrustStoreBytes(ByteStreams.toByteArray(trustStore)); // contains client certificate
sslContext.setTrustStorePass("asdfgh");
ResourceConfig rc = new ResourceConfig();
rc.register(new LoggingFilter(LOGGER, true));
rc.registerClasses(RootResource.class, SecurityFilter.class, AuthenticationExceptionMapper.class);
try {
webServer = GrizzlyHttpServerFactory.createHttpServer(
getBaseURI(),
rc,