def METHOD_NAME(some_function) -> callable:
    @functools.wraps(some_function)
    def authenticate_and_call(*args, **kwargs):
        request: ParticipantRequest = args[0]
        assert isinstance(request, HttpRequest), \
            f"first parameter of {some_function.__name__} must be an HttpRequest, was {type(request)}."
        correct_for_basic_auth(request)
        if validate_post(request, require_password=False, registration=False):
            return some_function(*args, **kwargs)
        # ios requires different http codes
        is_ios = kwargs.get("OS_API", None) == IOS_API
        return abort(401 if is_ios else 403)
    return authenticate_and_call