From 702c57f0145acf01e3f3a06652f7420061094361 Mon Sep 17 00:00:00 2001 From: Slesa Adhikari Date: Fri, 9 Aug 2024 09:31:10 -0500 Subject: [PATCH] Use `auth.validated_token` instead of `auth.get_username` for publish endpoint --- workflows_api/runtime/src/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows_api/runtime/src/main.py b/workflows_api/runtime/src/main.py index 6af00fb5..c1b72784 100644 --- a/workflows_api/runtime/src/main.py +++ b/workflows_api/runtime/src/main.py @@ -76,7 +76,7 @@ def validate_dataset(dataset: schemas.COGDataset): @workflows_app.post( - "/dataset/publish", tags=["Dataset"], dependencies=[Depends(auth.get_username)] + "/dataset/publish", tags=["Dataset"], dependencies=[Depends(auth.validated_token)] ) async def publish_dataset( token=Depends(auth.oauth2_scheme),