This commit is contained in:
2025-05-19 09:04:19 -03:00
parent 26b1e618b6
commit 7f4fec6e1e
33 changed files with 4728 additions and 542 deletions

View File

@@ -1,4 +1,3 @@
from auth import AuthFlowType
from aws_lambda_powertools.event_handler.api_gateway import (
APIGatewayHttpResolver,
Response,
@@ -9,6 +8,9 @@ from aws_lambda_powertools.event_handler.middlewares import (
)
from pydantic import UUID4, BaseModel, EmailStr, Field
from auth import AuthFlowType
class User(BaseModel):
id: str
name: str
@@ -22,8 +24,9 @@ class CognitoUser(User):
class AuthenticationMiddleware(BaseMiddlewareHandler):
"""This middleware extracts user authentication details from the Lambda authorizer context
and makes them available in the application context."""
"""This middleware extracts user authentication details from
the Lambda authorizer context and makes them available in the application context.
"""
def handler(
self,