return encryptedRequest;
}
@Override
protected FilterAction getSecureRequestHandlerFilterChain() throws Exception {
FilterChainElementFactory unpackerFactory = new FilterChainElementFactory() {
@Override
public FilterChainElement newInstance() throws FilterConfigurationException {
return new AbstractFilterChainElement<byte[], byte[]>() {
private FilterAction next;
@Override
protected byte[] doFilter(byte[] input, Map<String, Object> metaData) {
LOGGER.info("running unpacker");
EncryptedMessage deserialize = (EncryptedMessage) SerializationUtils.deserialize(input);
byte[] result = (byte[]) next.filter(deserialize, metaData);
return result;
}
@Override
public void setNext(FilterAction next) throws FilterConfigurationException {
this.next = next;
}
};
}
};
FilterChainElementFactory decrypterFactory = new MessageCryptoFilterFactory(privateKeySource, "AES");
FilterChainElementFactory parserFactory = new FilterChainElementFactory() {
@Override
public FilterChainElement newInstance() throws FilterConfigurationException {
return new AbstractFilterChainElement<byte[], byte[]>() {
private FilterAction next;