class PolicyV1Filter implements Filter {

    @Override
    public Promise<ActionResponse, ResourceException> filterAction(Context context, ActionRequest request,
            RequestHandler next) {
        // Forward onto next handler.
        return next.handleAction(context, request)
                .thenOnResult(new ResultHandler<ActionResponse>() {
                    @Override
                    public void handleResult(ActionResponse response) {
                        for (JsonValue entry : response.getJsonContent()) {
                            entry.remove("ttl");
                        }
                    }
                });
    }

    @Inject public  PolicyV1Filter(final ApplicationServiceFactory applicationServiceFactory,
                          final ExceptionMappingHandler<EntitlementException, ResourceException> resourceErrorHandler,
                          final ContextHelper contextHelper,
                          @Named("frRest") final Debug debug);

}