add ft to migrate from cognito
This commit is contained in:
@@ -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,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user