add link to catalog

This commit is contained in:
2025-12-19 12:55:42 -03:00
parent 3be296f1ac
commit 192be98c39
17 changed files with 514 additions and 46 deletions

View File

@@ -39,7 +39,7 @@ def authentication(
else:
if not pbkdf2_sha256.verify(password, password_hash):
dyn.update_item(
key=KeyPair(user_id, 'FAILED_ATTEMPTS'),
key=KeyPair(user_id, 'LOGIN#FAILED_ATTEMPTS'),
update_expr='SET #count = if_not_exists(#count, :zero) + :one, \
updated_at = :now',
expr_attr_names={
@@ -153,12 +153,12 @@ def new_session(user_id: str) -> str:
with dyn.transact_writer() as transact:
transact.delete(
key=KeyPair(user_id, 'FAILED_ATTEMPTS'),
key=KeyPair(user_id, 'LOGIN#FAILED_ATTEMPTS'),
)
transact.update(
key=KeyPair(user_id, '0'),
# Post-migration (users): uncomment the following line
# update_expr='SET last_login = :now',
# update_expr='SET last_login_at = :now',
update_expr='SET lastLogin = :now',
expr_attr_values={
':now': now_,