From 655fa7c05006caea442e835896691ff4aaedf983 Mon Sep 17 00:00:00 2001 From: Coldot <41678750+Coldot@users.noreply.github.com> Date: Fri, 21 Mar 2025 01:51:34 +0900 Subject: [PATCH 1/4] =?UTF-8?q?Refactor:=20`ISSUE=5FTEMPLATE`=20=ED=8F=B4?= =?UTF-8?q?=EB=8D=94=EB=AA=85=20=EB=B3=80=EA=B2=BD=EC=9D=84=20=EC=9C=84?= =?UTF-8?q?=ED=95=9C=20=EC=9E=84=EC=8B=9C=20=EC=9D=B4=EB=A6=84=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/{issue_template => ISSUE_TEMPLATEs}/chore-template.md | 0 .github/{issue_template => ISSUE_TEMPLATEs}/feature-template.md | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename .github/{issue_template => ISSUE_TEMPLATEs}/chore-template.md (100%) rename .github/{issue_template => ISSUE_TEMPLATEs}/feature-template.md (100%) diff --git a/.github/issue_template/chore-template.md b/.github/ISSUE_TEMPLATEs/chore-template.md similarity index 100% rename from .github/issue_template/chore-template.md rename to .github/ISSUE_TEMPLATEs/chore-template.md diff --git a/.github/issue_template/feature-template.md b/.github/ISSUE_TEMPLATEs/feature-template.md similarity index 100% rename from .github/issue_template/feature-template.md rename to .github/ISSUE_TEMPLATEs/feature-template.md From 10fa2c466bacc5104bf32347f889ae7fc67c2d3a Mon Sep 17 00:00:00 2001 From: Coldot <41678750+Coldot@users.noreply.github.com> Date: Fri, 21 Mar 2025 01:51:51 +0900 Subject: [PATCH 2/4] =?UTF-8?q?Refactor:=20`ISSUE=5FTEMPLATE`=20=ED=8F=B4?= =?UTF-8?q?=EB=8D=94=EB=AA=85=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/{ISSUE_TEMPLATEs => ISSUE_TEMPLATE}/chore-template.md | 0 .github/{ISSUE_TEMPLATEs => ISSUE_TEMPLATE}/feature-template.md | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename .github/{ISSUE_TEMPLATEs => ISSUE_TEMPLATE}/chore-template.md (100%) rename .github/{ISSUE_TEMPLATEs => ISSUE_TEMPLATE}/feature-template.md (100%) diff --git a/.github/ISSUE_TEMPLATEs/chore-template.md b/.github/ISSUE_TEMPLATE/chore-template.md similarity index 100% rename from .github/ISSUE_TEMPLATEs/chore-template.md rename to .github/ISSUE_TEMPLATE/chore-template.md diff --git a/.github/ISSUE_TEMPLATEs/feature-template.md b/.github/ISSUE_TEMPLATE/feature-template.md similarity index 100% rename from .github/ISSUE_TEMPLATEs/feature-template.md rename to .github/ISSUE_TEMPLATE/feature-template.md From 2b647d8ed45a377d463013ff96e05bf52458b296 Mon Sep 17 00:00:00 2001 From: Coldot <41678750+Coldot@users.noreply.github.com> Date: Fri, 21 Mar 2025 01:57:28 +0900 Subject: [PATCH 3/4] Feat: implement `get_current_user()` --- src/main/auth/dependencies.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/main/auth/dependencies.py diff --git a/src/main/auth/dependencies.py b/src/main/auth/dependencies.py new file mode 100644 index 0000000..4e1d847 --- /dev/null +++ b/src/main/auth/dependencies.py @@ -0,0 +1,17 @@ +from fastapi import Header, HTTPException +from typing import Annotated +import uuid + +async def get_current_user(x_auth_sub: Annotated[str | None, Header()] = None) -> uuid.UUID: + if not x_auth_sub: + raise HTTPException( + status_code=401, + detail="Unauthorized" + ) + try: + return uuid.UUID(x_auth_sub) + except ValueError: + raise HTTPException( + status_code=401, + detail="Unauthorized" + ) \ No newline at end of file From 49822d9d1263cae97edd2fc8430c2bb279c92a36 Mon Sep 17 00:00:00 2001 From: Coldot <41678750+Coldot@users.noreply.github.com> Date: Fri, 21 Mar 2025 01:57:57 +0900 Subject: [PATCH 4/4] Refactor: Create `__init__.py` --- src/main/auth/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/main/auth/__init__.py diff --git a/src/main/auth/__init__.py b/src/main/auth/__init__.py new file mode 100644 index 0000000..e69de29