ЕСОЗ - публічна документація

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Data structure

Entities (tables)

Authentication factors

This entity defines authentication factors entity information structure:

ColumnTypeM/OPurpose
iduuidM
user_iduuidMUser FK 
typevarcharM
factorvarcharOFactor value
is_activebooleanM
inserted_attimestampM
updateed_attimestampM
typefactor 

SMS

"+380677778899"
PHONE"+380677778899"
EMAIL"pupkin.vasya@gmail.com"

Users

This entity enrich a few attributes:

  • Store counters parameters for 2FA in `users.priv_settings` as structure :

    {
        "login_error_counter": 0,
        "otp_error_counter": 0
    }
  • Information about blocked directly in entity `users`. 

    ColumnTypePurpose
    is_blockedboolean
    block_reasonvarchar (255), NULL

Сonstraints

Authentication factors

  • user have one active 2FA factor ( one of any type)
  • unique index on user_id+type
  • No labels