import json

from messagebus import HttpResponseMessage, Message, MessageBus


def reply_forbidden(
    message_bus: MessageBus,
    message: Message,
):
    message_bus.reply_message(
        message,
        HttpResponseMessage(
            403,
            json.dumps(
                {
                    "message": "Forbidden",
                }
            ).encode("utf-8"),
            {
                "Content-Type": "application/json; charset=UTF-8",
                "authz-data": "no-authorization",
            },
        ),
    )
