Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3474,6 +3474,77 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ErrorBody'
/api/admin/users/{address}/impersonate:
post:
operationId: impersonateUser
tags:
- Admin
summary: Generate an impersonation JWT for a user (admin only)
description: >-
Admin-only endpoint that creates an audit-logged JWT allowing the
caller to act as the target user. The generated token carries a `user`
role assertion.
security:
- bearerAuth: []
parameters:
- schema:
type: string
required: true
name: address
in: path
responses:
'200':
description: Impersonation token
content:
application/json:
schema:
type: object
properties:
data:
type: object
properties:
token:
type: string
required:
- token
required:
- data
examples:
success:
value:
data:
token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJHVVNFUjg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4OCIsInJvbGUiOiJ1c2VyIn0.example
'400':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationErrorBody'
examples:
invalidAddress:
value:
error:
code: validation_error
details:
- code: too_small
message: Address must be a non-empty string
path:
- address
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorBody'
examples:
notAdmin:
value:
error:
code: forbidden
rateLimited:
value:
error:
code: rate_limit_exceeded
/api/admin/audit:
get:
operationId: getAdminAuditLog
Expand Down
71 changes: 71 additions & 0 deletions src/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3356,6 +3356,77 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ErrorBody'
/api/admin/users/{address}/impersonate:
post:
operationId: impersonateUser
tags:
- Admin
summary: Generate an impersonation JWT for a user (admin only)
description: >-
Admin-only endpoint that creates an audit-logged JWT allowing the
caller to act as the target user. The generated token carries a `user`
role assertion.
security:
- bearerAuth: []
parameters:
- schema:
type: string
required: true
name: address
in: path
responses:
'200':
description: Impersonation token
content:
application/json:
schema:
type: object
properties:
data:
type: object
properties:
token:
type: string
required:
- token
required:
- data
examples:
success:
value:
data:
token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJHVVNFUjg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4OCIsInJvbGUiOiJ1c2VyIn0.example
'400':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationErrorBody'
examples:
invalidAddress:
value:
error:
code: validation_error
details:
- code: too_small
message: Address must be a non-empty string
path:
- address
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorBody'
examples:
notAdmin:
value:
error:
code: forbidden
rateLimited:
value:
error:
code: rate_limit_exceeded
/api/admin/audit:
get:
operationId: getAdminAuditLog
Expand Down
Loading