/
Disable User 2FA
ЕСОЗ - публічна документація
Disable User 2FA
Specification
Apiary | |
PATCH | mithril/api/users/{user_id}/authentication_factors{2fa_id}/actions/disable |
Scope | authentication_factor:write |
Purpose
Disable 2FA for user (via Admin-console).
Request parameters
- user_id
- 2fa_id
Logic WS
- Validate token & scope
- Validate user_id FK
- Validate 2fa_id FK
Get 2FA item by $.2fa_id for non-blocked user by $.user_id
SELECT * FROM authentication_factors AS 2FA INNER JOIN user AS U ON 2FA.user_id = U.id WHERE U.id = $.user_id AND 2FA.id = $.2fa_id AND U.is_active = TRUE AND U.is_blocked = FALSE
- If exist 2FA item for user → update 2FA item (set values):
- 2FA.is_active = FALSE
- 2FA.update_at = now()
- If exist 2FA item for user → update 2FA item (set values):
- Return 200
Response
- 200 if 2FA successful disable + 2FA_object_view
- 4xx in other case
, multiple selections available,
Related content
Enable User 2FA
Enable User 2FA
More like this
Create User 2FA
Create User 2FA
More like this
Reset User 2FA
Reset User 2FA
More like this
Create User
Create User
More like this
Get user 2FA List
Get user 2FA List
More like this
Get user 2FA by ID
Get user 2FA by ID
More like this
ЕСОЗ - публічна документація