Skip to content

Commit

Permalink
Added the Unlock users endpoint
Browse files Browse the repository at this point in the history
Signed-off-by: Ihor Aleksandrychiev <[email protected]>
  • Loading branch information
aleksandrychev committed Sep 6, 2024
1 parent b37ffa6 commit 7e31bd7
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions api/enterprise-api-ref/users-rbac.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -367,3 +367,30 @@ API call allowed only for administrator.

Remove role definition.
API call allowed only for administrator.

## Unlock user

If a system enforces using two-factor authentication (2FA),
users must configure it after their first login within 48 hours.
This endpoint unlocks users who have been locked out due to this reason
and grants an additional 48 hours to complete the 2FA setup.

Note: to be able to perform this action related RBAC rule (alias `user.unlock`) should be enabled.

**URI:** https://hub.cfengine.com/api/user/:username/unlock

**Method:** POST

**Example request (curl):**

```console
curl --user <username>:<password> \
-X POST \
https://hub.cfengine.com/api/user/tom/unlock
```

**Example response:**

```
HTTP 202 ACCEPTED
```

0 comments on commit 7e31bd7

Please sign in to comment.