From 279ca399da148d6a2b52aadea2dca58363452d97 Mon Sep 17 00:00:00 2001 From: "Jens W. Klein" Date: Mon, 9 Dec 2024 15:56:48 +0100 Subject: [PATCH] first empty stub --- src/edutap/wallet_google/handlers/fastapi.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/edutap/wallet_google/handlers/fastapi.py diff --git a/src/edutap/wallet_google/handlers/fastapi.py b/src/edutap/wallet_google/handlers/fastapi.py new file mode 100644 index 0000000..5919b2b --- /dev/null +++ b/src/edutap/wallet_google/handlers/fastapi.py @@ -0,0 +1,15 @@ +from ..models.callback import CallbackData +from .validate import verified_signed_message +from fastapi import HTTPException +from fastapi import Request +from fastapi import router +from fastapi.logger import logger + + +@router.post("/callback") +async def handle_callback(request: Request, callback_data: CallbackData): + callback_message = verified_signed_message(callback_data) + logger.debug(f"Got message {callback_message}") + # TODO: here we need to call a plugin (async best) to handle the callback + # and handle erross + return {"status": "success"}