Checks if the Authorization barer exists. Otherwise throw 401
    :param func:
    :return:

def jwt_required(func):
    """
    Checks if the Authorization barer exists. Otherwise throw 401
    :param func:
    :return:
    """
    if inspect.isclass(func):
        apply_function_to_members(func, jwt_required)
        return func
    else:
        @functools.wraps(func)
        def deco(*a, **kw):
            if not "Authorization" in request.headers:
                abort(401, "Not Authorized")
            return func(*a, **kw)

        return deco