Implement logout route

This commit is contained in:
François Voron
2020-02-03 10:12:33 +01:00
parent 0fdd0fd070
commit 05b1df9a16
13 changed files with 238 additions and 0 deletions

View File

@@ -57,6 +57,19 @@ Login a user against the method named `name`. Check the corresponding [authentic
}
```
### `POST /logout/{name}`
Logout the authenticated user against the method named `name`. Check the corresponding [authentication method](../configuration/authentication/index.md) to view the success response.
!!! fail "`401 Unauthorized`"
Missing token or inactive user.
!!! success "`200 OK`"
The logout process was successful.
!!! success "`202 Accepted`"
The logout process is not applicable for this authentication backend (e.g. JWT).
### `POST /forgot-password`
Request a reset password procedure. Will generate a temporary token and call the `on_after_forgot_password` [event handlers](../configuration/router.md#event-handlers) if the user exists.