add ft to migrate from cognito

This commit is contained in:
2025-10-01 23:57:47 -03:00
parent daddab444f
commit 20d0d2b00f
12 changed files with 76 additions and 25 deletions

View File

@@ -14,7 +14,7 @@ from aws_lambda_powertools.event_handler.exceptions import (
from layercake.dynamodb import DynamoDBPersistenceLayer, KeyPair, SortKey
from boto3clients import dynamodb_client
from config import ISSUER, JWT_ALGORITHM, JWT_SECRET, OAUTH2_TABLE
from config import ISSUER, OAUTH2_TABLE, SESSION_SECRET
from oauth2 import server
router = Router()
@@ -63,12 +63,11 @@ def authorize():
def verify_session(session_id: str) -> tuple[str, str | None]:
payload = jwt.decode(
session_id,
JWT_SECRET,
algorithms=[JWT_ALGORITHM],
SESSION_SECRET,
algorithms=['HS256'],
issuer=ISSUER,
options={
'require': ['exp', 'sub', 'iss', 'sid'],
'leeway': 60,
},
)