Skip to content

Commit 7e31bd7

Browse files
Added the Unlock users endpoint
Signed-off-by: Ihor Aleksandrychiev <ihor.aleksandrychiev@northern.tech>
1 parent b37ffa6 commit 7e31bd7

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

api/enterprise-api-ref/users-rbac.markdown

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,3 +367,30 @@ API call allowed only for administrator.
367367

368368
Remove role definition.
369369
API call allowed only for administrator.
370+
371+
## Unlock user
372+
373+
If a system enforces using two-factor authentication (2FA),
374+
users must configure it after their first login within 48 hours.
375+
This endpoint unlocks users who have been locked out due to this reason
376+
and grants an additional 48 hours to complete the 2FA setup.
377+
378+
Note: to be able to perform this action related RBAC rule (alias `user.unlock`) should be enabled.
379+
380+
**URI:** https://hub.cfengine.com/api/user/:username/unlock
381+
382+
**Method:** POST
383+
384+
**Example request (curl):**
385+
386+
```console
387+
curl --user <username>:<password> \
388+
-X POST \
389+
https://hub.cfengine.com/api/user/tom/unlock
390+
```
391+
392+
**Example response:**
393+
394+
```
395+
HTTP 202 ACCEPTED
396+
```

0 commit comments

Comments
 (0)