add auth middleware

This commit is contained in:
2025-03-25 15:07:49 -03:00
parent 317c79cee2
commit cd6fdd58ad
12 changed files with 176 additions and 36 deletions

View File

@@ -1,3 +1,28 @@
"""
Example
-------
Resources:
HttpApi:
Type: AWS::Serverless::HttpApi
Properties:
Auth:
DefaultAuthorizer: LambdaRequestAuthorizer
Authorizers:
LambdaRequestAuthorizer:
FunctionArn: !GetAtt Authorizer.Arn
AuthorizerPayloadFormatVersion: "2.0"
EnableFunctionDefaultPermissions: true
EnableSimpleResponses: true
Identity:
Headers: [Authorization]
Authorizer:
Type: AWS::Serverless::Function
Properties:
Handler: auth.lambda_handler
"""
from dataclasses import dataclass
import boto3