1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 02:09:37 +02:00

Add ability to list and revoke token sessions

This commit is contained in:
Chocobozzz 2025-07-30 11:33:07 +02:00
parent a53ed039b8
commit 57caf25611
No known key found for this signature in database
GPG key ID: 583A612D890159BE
40 changed files with 1158 additions and 138 deletions

View file

@ -232,13 +232,22 @@ export class UsersCommand extends AbstractCommand {
// ---------------------------------------------------------------------------
getMyInfo (options: OverrideCommandOptions = {}) {
getMyInfo (options: OverrideCommandOptions & {
userAgent?: string
xForwardedFor?: string
} = {}) {
const path = '/api/v1/users/me'
const headers = options.userAgent
? { 'user-agent': options.userAgent }
: {}
return this.getRequestBody<MyUser>({
...options,
path,
headers,
xForwardedFor: options.xForwardedFor,
implicitToken: true,
defaultExpectedStatus: HttpStatusCode.OK_200
})