wip
This commit is contained in:
31
id.saladeaula.digital/app/app.py
Normal file
31
id.saladeaula.digital/app/app.py
Normal file
@@ -0,0 +1,31 @@
|
||||
from typing import Any
|
||||
|
||||
from aws_lambda_powertools import Logger, Tracer
|
||||
from aws_lambda_powertools.event_handler.api_gateway import (
|
||||
APIGatewayHttpResolver,
|
||||
)
|
||||
from aws_lambda_powertools.logging import correlation_paths
|
||||
from aws_lambda_powertools.utilities.typing import LambdaContext
|
||||
|
||||
from routes.authorize import router as authorize
|
||||
from routes.jwks import router as jwks
|
||||
from routes.login import router as login
|
||||
from routes.openid_configuration import router as openid_configuration
|
||||
from routes.token import router as token
|
||||
from routes.userinfo import router as userinfo
|
||||
|
||||
logger = Logger(__name__)
|
||||
tracer = Tracer()
|
||||
app = APIGatewayHttpResolver(enable_validation=True)
|
||||
app.include_router(login)
|
||||
app.include_router(authorize)
|
||||
app.include_router(jwks)
|
||||
app.include_router(token)
|
||||
app.include_router(userinfo)
|
||||
app.include_router(openid_configuration)
|
||||
|
||||
|
||||
@logger.inject_lambda_context(correlation_id_path=correlation_paths.API_GATEWAY_HTTP)
|
||||
@tracer.capture_lambda_handler
|
||||
def lambda_handler(event: dict[str, Any], context: LambdaContext) -> dict[str, Any]:
|
||||
return app.resolve(event, context)
|
||||
Reference in New Issue
Block a user