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