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