# Path: openbrokerapi/helper.py
# def to_json_response(obj):
#     """ Following https://stackoverflow.com/a/1118038 """
#     from flask import jsonify
#     return jsonify(_to_dict(obj))
# 
# def version_tuple(v):
#     return tuple(map(int, (v.split("."))))
# 
# Path: openbrokerapi/response.py
# class ErrorResponse:
#     def __init__(self,
#                  error: str = None,
#                  description: str = None):
#         self.error = error
#         self.description = description
# 
# Path: openbrokerapi/settings.py
# MIN_VERSION = version_tuple(MIN_VERSION_STR)


import base64
import functools
import logging
from http import HTTPStatus
from openbrokerapi.helper import to_json_response, version_tuple
from openbrokerapi.response import ErrorResponse
from openbrokerapi.settings import MIN_VERSION
    from flask import request
    from flask import request, json
        from flask import request
        from flask import request
    from flask import request


logger = logging.getLogger(__name__)


def print_request():
    logger.debug("--- Request Start -------------------")
    logger.debug("--- Header")
    for k, v in request.headers:
        logger.debug("%s:%s", k, v)
    logger.debug("--- Body")
    logger.debug(request.data)
    logger.debug("--- Request End ---------------------")



# Path: openbrokerapi/helper.py
# def to_json_response(obj):
#     """ Following https://stackoverflow.com/a/1118038 """
#     from flask import jsonify
#     return jsonify(_to_dict(obj))
# 
# def version_tuple(v):
#     return tuple(map(int, (v.split("."))))
# 
# Path: openbrokerapi/response.py
# class ErrorResponse:
#     def __init__(self,
#                  error: str = None,
#                  description: str = None):
#         self.error = error
#         self.description = description
# 
# Path: openbrokerapi/settings.py
# MIN_VERSION = version_tuple(MIN_VERSION_STR)


# Path: openbrokerapi/request_filter.py
import base64
import functools
import logging
from http import HTTPStatus
from openbrokerapi.helper import to_json_response, version_tuple
from openbrokerapi.response import ErrorResponse
from openbrokerapi.settings import MIN_VERSION
    from flask import request
    from flask import request, json
        from flask import request
        from flask import request
    from flask import request



logger = logging.getLogger(__name__)


def print_request():
    logger.debug("--- Request Start -------------------")
    logger.debug("--- Header")
    for k, v in request.headers:
        logger.debug("%s:%s", k, v)
    logger.debug("--- Body")
    logger.debug(request.data)
    logger.debug("--- Request End ---------------------")



def check_originating_identity():