You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-29 22:01:14 +03:00
admin: get OAuth 2.0 session API
This commit is contained in:
@ -247,6 +247,79 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/admin/v1/oauth2-sessions/{id}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"oauth2-session"
|
||||
],
|
||||
"summary": "Get an OAuth 2.0 session",
|
||||
"operationId": "getOAuth2Session",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"title": "The ID of the resource",
|
||||
"$ref": "#/components/schemas/ULID"
|
||||
},
|
||||
"style": "simple"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OAuth 2.0 session was found",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SingleResponse_for_OAuth2Session"
|
||||
},
|
||||
"example": {
|
||||
"data": {
|
||||
"type": "oauth2-session",
|
||||
"id": "01040G2081040G2081040G2081",
|
||||
"attributes": {
|
||||
"created_at": "1970-01-01T00:00:00Z",
|
||||
"finished_at": null,
|
||||
"user_id": "02081040G2081040G2081040G2",
|
||||
"user_session_id": "030C1G60R30C1G60R30C1G60R3",
|
||||
"client_id": "040G2081040G2081040G208104",
|
||||
"scope": "openid",
|
||||
"user_agent": "Mozilla/5.0",
|
||||
"last_active_at": "1970-01-01T00:00:00Z",
|
||||
"last_active_ip": "127.0.0.1"
|
||||
},
|
||||
"links": {
|
||||
"self": "/api/admin/v1/oauth2-sessions/01040G2081040G2081040G2081"
|
||||
}
|
||||
},
|
||||
"links": {
|
||||
"self": "/api/admin/v1/oauth2-sessions/01040G2081040G2081040G2081"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "OAuth 2.0 session was not found",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorResponse"
|
||||
},
|
||||
"example": {
|
||||
"errors": [
|
||||
{
|
||||
"title": "OAuth 2.0 session ID 00000000000000000000000000 not found"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/admin/v1/users": {
|
||||
"get": {
|
||||
"tags": [
|
||||
@ -1214,6 +1287,34 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"UlidInPath": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"title": "The ID of the resource",
|
||||
"$ref": "#/components/schemas/ULID"
|
||||
}
|
||||
}
|
||||
},
|
||||
"SingleResponse_for_OAuth2Session": {
|
||||
"description": "A top-level response with a single resource",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"data",
|
||||
"links"
|
||||
],
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/SingleResource_for_OAuth2Session"
|
||||
},
|
||||
"links": {
|
||||
"$ref": "#/components/schemas/SelfLinks"
|
||||
}
|
||||
}
|
||||
},
|
||||
"UserFilter": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -1354,18 +1455,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"UlidInPath": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"title": "The ID of the resource",
|
||||
"$ref": "#/components/schemas/ULID"
|
||||
}
|
||||
}
|
||||
},
|
||||
"SetUserPasswordRequest": {
|
||||
"title": "JSON payload for the `POST /api/admin/v1/users/:id/set-password` endpoint",
|
||||
"type": "object",
|
||||
|
Reference in New Issue
Block a user