class SigningBasketLoggingInterceptor extends HandlerInterceptorAdapter {

    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
        Map<String, String> pathVariables = pathParameterExtractor.extractParameters(request);
        String basketId = Optional.ofNullable(pathVariables)
                              .map(pv -> pv.get("basketId"))
                              .orElse(NOT_EXIST_IN_URI);

        TppLogger.logRequest(request)
            .withTpp(tppService.getTppInfo())
            .withRequestUri()
            .withParam("Basket ID", basketId)
            .perform();

        return true;
    }

}