wip
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user