Skip to content

Commit

Permalink
Add masked logging configuration for UserLogin ID
Browse files Browse the repository at this point in the history
  • Loading branch information
gabino committed Jan 30, 2025
1 parent 1a1d12e commit e01cab2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cuenca/resources/user_logins.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import datetime as dt
from typing import ClassVar, Optional
from typing import Annotated, ClassVar, Optional

from cuenca_validations.types import LogConfig
from cuenca_validations.types.requests import UserLoginRequest
from pydantic import ConfigDict

Expand All @@ -11,6 +12,8 @@
class UserLogin(Creatable):
_resource: ClassVar = 'user_logins'

id: Annotated[str, LogConfig(masked=True, unmasked_chars_length=4)]

last_login_at: Optional[dt.datetime] = None
success: bool

Expand Down

0 comments on commit e01cab2

Please sign in to comment.