add expires_at to cert

This commit is contained in:
2025-09-17 20:34:08 -03:00
parent ad1a57e6a0
commit 51bf5191e9
5 changed files with 12 additions and 9 deletions

View File

@@ -8,6 +8,7 @@ from aws_lambda_powertools import Logger
from aws_lambda_powertools.event_handler.api_gateway import Router
from aws_lambda_powertools.event_handler.exceptions import (
BadRequestError,
ForbiddenError,
ServiceError,
UnauthorizedError,
)
@@ -42,7 +43,8 @@ def authorize():
# Deny authorization if user has no scopes matching the client request
if not user_scopes & client_scopes:
raise errors.InvalidScopeError(status_code=HTTPStatus.UNAUTHORIZED)
raise ForbiddenError()
# raise errors.InvalidScopeError(status_code=HTTPStatus.UNAUTHORIZED)
return server.create_authorization_response(
request=router.current_event,