fix(oauth): require security scopes to list and revoke tokens
/api/oauth_tokens skipped the scope check, so a token with any scope could list the user's sessions and revoke them.
This commit is contained in:
parent
9edce3a0a6
commit
c686b701dd
4 changed files with 50 additions and 22 deletions
|
|
@ -780,6 +780,7 @@ Emoji reactions work a lot like favourites do. They make it possible to react to
|
|||
### Retrieve a list of active sessions for the user
|
||||
* Method: `GET`
|
||||
* Authentication: required
|
||||
* OAuth scope: `read:security`
|
||||
* Params: none
|
||||
* Response: JSON
|
||||
* Example response:
|
||||
|
|
@ -808,8 +809,9 @@ Emoji reactions work a lot like favourites do. They make it possible to react to
|
|||
### Revoke a user session by its ID
|
||||
* Method: `DELETE`
|
||||
* Authentication: required
|
||||
* OAuth scope: `write:security`
|
||||
* Params: none
|
||||
* Response: HTTP 200 on success, 500 on error
|
||||
* Response: HTTP 201 on success, 500 on error
|
||||
|
||||
## `/api/v1/pleroma/settings/:app`
|
||||
### Gets settings for some application
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue